Write a program that will be a Point of Sale system at a food stall. The list of items and corresponding prices will be loaded

Question

Write a program that will be a Point of Sale system at a food stall.  The list of items and corresponding prices will be loaded from a text file.   Also, the sales tax will be loaded from a text file.

 

  • The Menu lists all the items and the following 3 commands.  

X = cancel the sale and start over

T = total the sale.

E = close the shift

  • The program repeatedly displays the Menu until the shift is closed (E is entered).
  • The program keeps a running total of the amount of sales and the end of shift the total sales is displayed.
  • Only one item is ordered at a time
  • When “X” is entered,

 

It clears the running totals and displays the Menu again.

  • When “T” is entered,
  • When “E” is entered,
  • Your numeric output is formatted to show two decimal places.

It displays the items purchased, the total price before sales tax. the sales tax due and the final total including the tax.

the program exits.  It displays how many each item sold, the sub-total, the total sales tax, and the grand total.

 

 

The menu.txt file:

Bubba Beef Burger, 2.00

Cubba Chicken Burger, 1.00

Suppa Shrimp Burger, 1.00

Huba Cheese Burger, 1.00

Fries, 1.00

Onion Rings, 1.00

Drinks, 1.00

 

tax.txt

8.25

 


 

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

AllyBaba Food Stall Store

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

O New Order

   E End of Daily sales

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

 

  • How to start a new order
  • How to order items
  • How to cancel a transaction
  • How to end daily sales of a transaction

 

Make your selection O

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

Make your selection T

 

Make your selection 1

How many Bubba Beef Burger 2

Cost: 2 Bubba Beef Burger: $4.00

 

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

 

Make your selection 2

How many Cubba Chicken Burger 6

Cost: 6 Cubba Chicken Burger: $6.00

 

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

 

Make your selection T

 

Food List

2 Bubba Beef Burger  $4.00

6 Cubba Chicken Burger $6.00

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

Sub Total $10.00

Sales Tax (8.25%) $0.83

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

Total Sales $10.83

 

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

Make your selection B

How many Bubba Beef Burger 2

Cost: 2 Bubba Beef Burger: $4.00

 

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

Make your selection X

!! Transaction cancelled

 

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

AllyBaba Food Stall Store

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

Food Items

  • Bubba Beef Burger 2.00
  • Cubba Chicke2.  Burger 1.00
  • Suppa Shrimp Burger 1.00
  • Huba Cheeseburger 1.00
  • Fries 1.00
  • Onion Rings 1.00
  • Drinks 1.00

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

X Cancel Transaction

T End of Transaction

   E End of Daily sales

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

 

Make your selection E

Daily Sales Transactions (Grand Total)

 

Food Sold…

2 Bubba Beef Burger  $4.00

6 Cubba Chicken Burger $6.00

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

Sub Total $10.00

Sales Tax (8.25%) $0.83

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

Total Sales $10.83

Details
Attachments
Purchase An Answer Below

Have a similar question?