Title Counting the Number of Valid and Banned Product Codes (Case 2)
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/exceptions_j_check_producut_code__664e429291363872f0ba36dc?index=1
Platform Name PCEX
Features
Description Suppose a hypothetical company uses codes to represent its various products. A product code includes, among other information, a character in the tenth position that represents the zone from which that product was made, and a four-digit integer representing the district in which it will be sold. This four-digit integer begins at the 4th character and extends to the 7th character in the input code (inclusive). Due to some reorganization, products from zone R are banned from being sold in districts with a designation of 2000 or higher.\nConstruct a program that reads product codes from the user and counts the number of valid and banned codes entered. Make sure that the program handles all possible exceptions.\nThe program must ask the user for an input until the user enters STOP.
Keywords
Author Mohammad Hassany
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/exceptions_j_check_producut_code__664e429291363872f0ba36dc?index=1
Protocol SPLICE
Protocol URL
License MIT
Programming Language JAVA
Natural Language en

Preview

SPLICE Output