Problem

For Exercises 15 through 19, use the incremental development methodology to implement th...

For Exercises 15 through 19, use the incremental development methodology to implement the program. For each exercise, identify the program tasks, create a design document with class descriptions, and draw the program diagram. Map out the development steps at the start. Present any design alternatives and justify your selection. Be sure to perform adequate testing at the end of each development step.

In Exercise 23 of Chapter 5 you wrote a drive-through ordering system for MyJava Lo-Carb Gourmet Sandwich (the company has since changed its name to reflect the current trend in the food industry). You are hired again as a freelance computer consultant to make extensions to the program.

Instead of having a fixed number of menu categories and a fixed number of menu items per category, you will input this information from a text file. The data in the input file have the following format:

Each menu category is preceded by the pound symbol (#).Alist of menu items that belong to this menu category follows it. Each menu item includes its name and price. The price is preceded by the dollar sign. Here’s a sample input file:

You may assume that that input file contains at least one menu category and each menu category has at least one menu item. Also, you may assume that all input lines conform to the given format; that is, there will be no invalid input lines. Finally, there will be at most 20 menu categories and 25 menu items per menu category.

After the input file data are read into a program, the operation mode begins, where you continually process the customer orders. For each item on the menu, keep track of the sales. At the closing time, the store manager keys in a special code to shut down the program. Before stopping the program, output the sales figure in a format similar to the following:

Place enough space between columns so the output is easy to read.You are not required to align the decimal points of the dollar figures. Output the sales figure to the standard output. Save the sales figure to a text file.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 12