Object Orientation Please use Arrays or ArrayLists where appropriate Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed). Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock. Read all the food items from the text file “Items.txt” Display all the food items available for this food truck. Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to the menu and a food item may not appear on the menu more than once. Display appropriate error messages in the cases when a food item is not added to the menu. Display the day’s menu on the screen. The menu must be nicely laid out under the headings “Breakfast”, “Lunch” and “Supper”. Display the description and price for each item. Allow the user to record sales for menu food items that occurred during the day. Continuously prompt the user for the codes of sold items and update the associated item’s quantity in stock. Each sale is assumed to be for a single quantity of the food item. If a food item’s quantity in stock becomes 0 after a sale, then that item must be removed from the menu. Display appropriate error message when a food item could not be found. The owner of the food truck would like to know which items are running low so that he can place an order to his supplier. Create a file “Reorder.txt” which contains all the food items of which there are less than 3 in stock. Implement a text menu in your program class to test that all the methods implemented.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

Computer Science

C# Programming

 

Object Orientation

 

Please use Arrays or ArrayLists where appropriate

 

Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed).

 

Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock.

 

Read all the food items from the text file “Items.txt”

 

Display all the food items available for this food truck.

 

Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to the menu and a food item may not appear on the menu more than once. Display appropriate error messages in the cases when a food item is not added to the menu.

 

Display the day’s menu on the screen. The menu must be nicely laid out under the headings “Breakfast”, “Lunch” and “Supper”. Display the description and price for each item.

 

Allow the user to record sales for menu food items that occurred during the day. Continuously prompt the user for the codes of sold items and update the associated item’s quantity in stock. Each sale is assumed to be for a single quantity of the food item. If a food item’s quantity in stock becomes 0 after a sale, then that item must be removed from the menu. Display appropriate error message when a food item could not be found.

 

The owner of the food truck would like to know which items are running low so that he can place an order to his supplier. Create a file “Reorder.txt” which contains all the food items of which there are less than 3 in stock.

 

Implement a text menu in your program class to test that all the methods implemented.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning