Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Assignment #2 in CIS12 Please use speaker notes for additional information!

Similar presentations


Presentation on theme: "Programming Assignment #2 in CIS12 Please use speaker notes for additional information!"— Presentation transcript:

1 Programming Assignment #2 in CIS12 Please use speaker notes for additional information!

2 121212Stephen Daniels Jean Shorts 0150002 123456Jennifer Ames Sandals 0299901 144445Susan Richards Sweater 0499501 145678John Smith Tank Top 0109904 212121Linda Costa Socks 0029910 242424Michael Fletcher Suit 2259501 252728Russell Warren Coat 1999801 272817Ann Washington Gown 5000001 300456Dick Southworth Sweatshirt 0159902 454567Mary Stretton Bathrobe 0259701 The file layout is: 1 - 6 Customer Number 7 - 26 Customer Name 27 - 46 Product 47 - 51 Standard Price 52 - 53 Classification Note that the standard price is 5 characters made up of 3 whole numbers and 2 decimal numbers. Customer.dat

3 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.

4 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

5 Possible output 121212 Stephen Daniels Jean Shorts $15.00 $15.00 Steady 123456 Jennifer Ames Sandals $29.99 $26.99 Excellent 144445 Susan Richards Sweater $49.95 $44.95 Excellent 145678 John Smith Tank Top $10.99 $12.08 Irregular 212121 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.


Download ppt "Programming Assignment #2 in CIS12 Please use speaker notes for additional information!"

Similar presentations


Ads by Google