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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education