Programming Assignment #2 in CIS12 Please use speaker notes for additional information!
121212Stephen Daniels Jean Shorts Jennifer Ames Sandals Susan Richards Sweater John Smith Tank Top Linda Costa Socks Michael Fletcher Suit Russell Warren Coat Ann Washington Gown Dick Southworth Sweatshirt Mary Stretton Bathrobe The file layout is: Customer Number Customer Name Product Standard Price Classification Note that the standard price is 5 characters made up of 3 whole numbers and 2 decimal numbers. Customer.dat
Output requirements The detail output should include the following: Customer Number - this is taken directly from the input record Customer Name - this is taken directly from the input record Product - this is taken directly from the input record Standard Price - this is taken directly from the input record (3 whole numbers, 2 decimal) Customer Special Price - this is the result of a calculation - this is handled differently depending on whether the classification code is 01, 02, 04 or 10 Classification Name - a different name is printed depending on whether the classification code is 01, 02, 04, or 10 The total output should include the number of records processed in each classification - therefore, the program should add to different counters depending on whether the classification code is 01, 02, 04, or 10. NOTE: There should be four totals.
Classification codes Recommendation: I would suggest that in the loop where you are processing the records, you check the classification code. There are three things to do dependent on that classification code: Calculate the special price Move the classification name to the printer Add to the appropriate classification counter
Possible output Stephen Daniels Jean Shorts $15.00 $15.00 Steady Jennifer Ames Sandals $29.99 $26.99 Excellent Susan Richards Sweater $49.95 $44.95 Excellent John Smith Tank Top $10.99 $12.08 Irregular Linda Costa Socks $2.99 $4.28 Problem Note that there are additional records - this is only partial output. The calculated price and the classification name are the last two fields - the other data comes directly from the input.