CS 1401 Assignment #10

Date Assigned: Monday, November 5, or Tuesday, November 6, 2007.

Due Date: Monday, November 12, or Tuesday, November 13, 2007, before the beginning of your lab section.

Objective: The main objective of this assignment is to learn to use arrays of objects.

Programming assignment: The task is the same as in the previous Assignment 9: Write a program for helping waiters. This program must allow the user to enter the names of different menu items (foods or drinks), the amount of each item, and the price of each item. Assume that the number of different items does not exceed 100. Your program must store all this data, and then print the detailed menu including the information about all the items plus the following information:

Main difference: In the previous assignment 9, following our advise, you stored the names in one array (array of strings), the amounts in another array (array of integers), and the prices in yet another array (array of real numbers).

For this new assignment, define a class FoodItem whose objects contain three fields:

Instead of using three arrays, use a single array of food items (i.e., of objects of type FoodItem).

Deliverables: as instructed by your TA.