Question: Console app : A store only sells 4 items: Milk (barcode 811; $4.50 per gallon; 0% sales tax), dish detergent (barcode 120; $9.32 per container;

  1. Console app: A store only sells 4 items: Milk (barcode 811; $4.50 per gallon; 0% sales tax), dish detergent (barcode 120; $9.32 per container; 9.45% sales tax), newspapers (barcode 345; $1.50 each; 4.25% state tax) and boxes of cigarettes (barcode 012; $15 each; 120% sales tax). Develop a program for a point of sale (POS) machine that does the following:
    1. Waits for the cashier to type in checkout or logout; if the latter, exit the application; else for checkout go thru following steps:
    2. scan each item on one line, user will enter the barcode, a space, and then quantity. For each item:
      1. Check if the barcode is recognized and quantity is numeric and > 0. If either not met, print an error message and go back to (b).
      2. Calculate subtotal and tax (applying correct tax for the item) and add to order total.
      3. Add item line to receipt string.
    3. Repeat (b) until a blank line is entered, then calculate and print a receipt similar to the following in format (note column alignments):

Milk $ 4.50 x 5 $ 22.50

Dish Det $ 9.32 x 1 $ 9.32

---------------------------------------------------

Subtotal $ 31.82

Tax $ 0.88

---------------------------------------------------

Total $ 32.70

  1. Return to step (a)

The application must validate all user input and give appropriate messages to the user if invalid data is entered; the program should not fail or end prematurely.

*****do in C#********

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!