Sorry! We could not find what you were looking for

Try going back to the main page here

 
4
4
0
0
0
0

Project 2

Pizza

Posted: Monday 9/23/02
Design Document Due: before midnight, Sunday 9/29/02
Project Due: Before midnight, Sunday 10/6/02
Notes 02 Oct 02
For Mr. Raouf's sections only -- Mr. Raouf is offering 10 points extra credit for those students who validate the user's telephone number. The accepted format of the phone number is (999) 999-9999.
30 Sept 02
If you overload the input operator ( operator>> ) for both the Order and Pizza classes, then it is not necessary to provide mutators unless you need them for some other functionality.
24 Sept 02
For simplicity, the phone number should be considered a string
Please follow the order specified in the sample run for user input. I.e. input name first, then phone number, then sodas, etc. This will help us aoutmate the testing of your project.
23 Sept 02
It is permissible for the user to request the same topping more than once for a single pizza. I.e. Small Pizza with onion, onion and onion is okay


Objectives


Project Description

Pizza is a staple of every college student's diet. They eat pizza for lunch, dinner and late night snack. They even eat it cold for breakfast. They eat plain, with pepperoni or with every possible topping. They eat large pizzas, small pizzas and medium pizzas.

In this project, you will simulate the user callling to order a pizza at the UMBC take-out pizza shop. You will prompt the user for identification (name and phone number), the items he wishes to order (soda, breadsticks and pizza), and the size and toppings for each pizza ordered. There is a maximum of 5 pizzas per order and 3 toppings per pizza.

After the ordering is complete, you will calculate the price of the order and neatly display the price along with the user indentification and order information.


Futher Specification

UMBC Pizza Take-Out Price List

ItemPrice
2-Liter Soda$1.19
Breadsticks $0.99
Plain Small Pizza $4.99
Plain Medium Pizza $6.99
Plain Large Pizza $9.99
Pizza Toppings $0.79 each on Small Pizza
$0.99 each on Medium Pizza
$1.29 each on Large Pizza

Pizza Toppings Available

Pizza Toppings
pepperoni
mushrooms
sausage
anchovies
onions
green pepper

Project classes

This project will require you design and implement two C++ classes as described below. Be sure to consider the OOP principles of encapsulation and data hiding when designing and implementing these classes.

The Order Class

This class maintains all the information for an order. This class provides the following functionality

The Pizza Class

This class maintains all information about a pizza This class provides the following functionality

Sample Run

This output was generated by hand, not by any program. That means that there may be typos, addition mistakes and/or other inconsistencies. Your output does not need to look exactly like this, but be neatly formatted to be easily readable and must contain all required information [linux2] Proj2 Welcome to the UMBC Pizza Shop Please enter your name: Bob Smith Please enter your phone number: 410-555-4432 How many 2-liter sodas would you like? 2 How many breadsticks would you like? 0 How many pizzas would you like? 7 Sorry, but there is a maximum of 5 pizzas per order How many pizzas would you like? 2 Would you like to see a list of toppings? yes pepperoni mushrooms sausage anchovies onions green pepper What size for pizza #1? small How many toppings would you like for pizza #1? 5 Sorry, but there is a maximum of 3 toppings per pizza How many toppings would you like for pizza #1? 3 Please enter a topping: pepperoni Please enter a topping: garlic Sorry, we don't offer garlic, please enter another topping Please enter a topping: mushrooms Please enter a topping: onions What size for pizza #2? large How many toppings would you like for pizza #2? 2 Please enter a topping: anchovies Please enter a topping: onions Your order details: UMBC Pizza Take-Out Shop Ordered by: Bob Smith Phone: 410-555-4432 Item Quantity Cost ---- -------- ---- Soda 2 $ 2.38 BreadSticks 0 $ 0.00 Small Pizza $ 7.36 pepperoni, mushrooms, onions Large Pizza $12.57 onions, anchovies Total Cost: $22.31 Thanks for calling UMBC Pizza Take-Out! Have a nice day!

Design Assignment

Your design assignment must specify the class interface for all classes in the project (essentially your .H files), including the signatures of all methods and the declarations of all private data.

Your design assignment must also specify your basic algorithm.


Error Handling

You must validate all user input. If you detect invalid input, output a meaningful error message and reprompt for the input.

Project Make File

You are required to submit a make file with this project. The grader should simply need to type "make Proj2" and your project should compile and link to an executable called Proj2. The grader should also have the ability to do a "make clean" and "make cleanest." Hint:Start with the makefile from project 1 and modify it.

See the 202 Syllabus for links to more information on make files.


Grading

The grade for this project will be broken down as follows:


Project Submission

You must use separate compilation for this project. You should submit the following files:

Submit as follows:

submit cs202 Proj2 <list of files> The order in which the files are listed doesn't matter.

You can check to see what files you have submitted by typing

submitls cs202 Proj2

More complete documentation for submit and related commands can be found here.

Remember -- if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.

Sorry! We could not find what you were looking for

Try going back to the main page here

 
4
4
0
0
0
0