An Italian Takeaway is asking you to write a computer program to facilitate the ordering process and automatically calculate the total cost of an order.
They have stored their menu and all prices into a text file with the following information:
When a customer order food, they give the lists of codes they would like order. For instance a customer could order the following: S4,P3,P7,X2,D4,C1,W2
Your program should allow the customer to order as many options from the menu as they need. For each option, it should lookup the price in the text file provided. It should then calculate and output the total cost of the order.
To complete this challenge you will need to read more about how to read through a CSV file.
Complete the Code
Once you have completed the code check that it produces the expected output by performing the following tests:
|Test #||Input Values||Expected Output||Actual Output|
Add some input validation routines to your code so that the customer can only enter a valid code from the menu.