Program Four

Write a program that will serve as a cash register for a small food stand.

The menu is very limited, in fact, there are three sandwiches, two sides and three drinks. The list of items, along with their prices are stored in a file (prices.dat).

When a customer places an order, they fill out a sheet, marking the items they are interested in, scan the sheet, and save the results as a text file. Your program should read the order file (order.dat) and produce a receipt, including a description of the items ordered, and the total cost.

File Descriptions:

A price.dat file might look like:
HotDigetyDog  1.00  Onions Relish
Hamburger     1.25  Cheese Tomato
TostyCheese   0.75  American Swiss
.75 Onion Rings
.95 French Fries
Milk .50 .75 1.25
Coke .75  1.00  1.25
Coffee .25  .33  .50
A corresponding order.dat might look like:
1 Y N 
0 N N 
1 Y N
2
0
0 1 0 
2 0 0 
0 0 0 
The receipt should list a single line for each line input, but provide a description. You should also give an associated price for each line. Finally, you should include a total purchase line.

The above input may produce

Welcome to Joe's
     Your Order Is

 1 HotDigetyDog with Onions       $1.00
 1 TostyCheese  with American     $0.75
 2 Onion Rings                    $1.50
 1 Medium Milk                    $0.50
 2 Small Coke                     $1.50

 Total                            $5.25
 Thank you for your order.