Professional Documents
Culture Documents
04 Proveit02 Instructions
04 Proveit02 Instructions
Do you like pizza? Here is a program to help customers judge the price of their pizza at
the Pizza Palace restaurant.
We’ll supply the code, pizza.java, to get you started. Create a new java class called pizza
and copy and paste the pizza.java text that came with these instructions.
Your task is to add code so that your program looks like this:
Answer 1 for Yes or 0 for No for the following extra pizza additions
Pepperoni: 1
Sausage: 0
Ham: 0
Extra Cheese: 1
Pineapple: 0
Onion: 1
Black Olives: 1
Green Peppers: 0
Would you like a Medium Pizza (1=Yes, 0=No): 0
Would you like a Large Pizza (1=Yes, 0=No): 1
Don’t forget to change the name and date at the bottom of the program.
The Pizza Palace charges $5 for a basic pizza, $1 for each additional meat, and $0.50 for
each veggie ingredient. A medium pizza adds 25% and a large adds 50%.
Include the java code where requested by the program comments. Run and test your
program for different Pizza options. You must first calculate the total before testing your
program. So, for the example given above:
Basic pizza price 5
1 extra meat 1
3 extra veggie (3 x 0.5) 1.5 +
------
Sub-total 7.5
Submission