Part 2: Now follow the instructions to create a class named PizzaPalaceFinal Open Eclipse. Select the project Chap7-PizzaPalaceFinal in the left pane. Next, create a New -> Class. Name it PizzaPalaceFinal and check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "PizzaPalaceFinal.java" Add a comment at the top // (your name) Add another comment at the top // Exercise 7 Copy the code from your PizzaPalace.java file from Project 6 and paste it into this file. Save the file. (Attached to this question is the code for PizzaPalace.java) Edit your code for this file to implement an array of pizzas. This change will only require modifications to your file "PizzaPalaceFinal.java": Requirements: Create an array of Pizza objects named pizzas and size it to the number of Pizzas specified by the user After you created each pizza object and verified it was correct, add code to store the pizza object in the array pizzas Add another for-loop to spin through the objects in the array pizzas: calculate the price of each pizza in the array add the price to the order total Test your code to verify that it works. Sample Output: Welcome to Pizza Palace!! Let's take your order!! Enter your first and last name seperated by a space: Jason Tatum How many pizzas would you like to order: 3 Pizza #1 What size pizza? (1=small, 2=medium, 3=large): 1 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 1 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 0 Please verify your order: Small ThinCrust Toppings= $12.00 Is this correct? (y=yes or n=no): y Pizza #2 What size pizza? (1=small, 2=medium, 3=large): 2 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 2 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 2 topping #1 : p topping #2 : m Please verify your order: Medium ThickCrust Toppings=Pepperoni+Mushroom $19.00 Is this correct? (y=yes or n=no): y Pizza #3 What size pizza? (1=small, 2=medium, 3=large): 3 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 3 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 3 topping #1 : g topping #2 : o topping #3 : s Please verify your order: Large StuffedCrust Toppings=GreenPepper+Onion+Sausage $24.00 Is this correct? (y=yes or n=no): y Jason Tatum , your order has been placed. Your total with tax is: $58.44 Is this for Dine-In or Take-Out? (d=DineIn t=TakeOut): d We have free WIFI available while you dine in at our restaurant. When you arrive, please see the cashier to pay for your order and pickup your pizza. We look forward to your arrival!
Part 2: Now follow the instructions to create a class named PizzaPalaceFinal Open Eclipse. Select the project Chap7-PizzaPalaceFinal in the left pane. Next, create a New -> Class. Name it PizzaPalaceFinal and check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "PizzaPalaceFinal.java" Add a comment at the top // (your name) Add another comment at the top // Exercise 7 Copy the code from your PizzaPalace.java file from Project 6 and paste it into this file. Save the file. (Attached to this question is the code for PizzaPalace.java) Edit your code for this file to implement an array of pizzas. This change will only require modifications to your file "PizzaPalaceFinal.java": Requirements: Create an array of Pizza objects named pizzas and size it to the number of Pizzas specified by the user After you created each pizza object and verified it was correct, add code to store the pizza object in the array pizzas Add another for-loop to spin through the objects in the array pizzas: calculate the price of each pizza in the array add the price to the order total Test your code to verify that it works. Sample Output: Welcome to Pizza Palace!! Let's take your order!! Enter your first and last name seperated by a space: Jason Tatum How many pizzas would you like to order: 3 Pizza #1 What size pizza? (1=small, 2=medium, 3=large): 1 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 1 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 0 Please verify your order: Small ThinCrust Toppings= $12.00 Is this correct? (y=yes or n=no): y Pizza #2 What size pizza? (1=small, 2=medium, 3=large): 2 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 2 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 2 topping #1 : p topping #2 : m Please verify your order: Medium ThickCrust Toppings=Pepperoni+Mushroom $19.00 Is this correct? (y=yes or n=no): y Pizza #3 What size pizza? (1=small, 2=medium, 3=large): 3 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 3 Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage How many toppings would you like? (0-5): 3 topping #1 : g topping #2 : o topping #3 : s Please verify your order: Large StuffedCrust Toppings=GreenPepper+Onion+Sausage $24.00 Is this correct? (y=yes or n=no): y Jason Tatum , your order has been placed. Your total with tax is: $58.44 Is this for Dine-In or Take-Out? (d=DineIn t=TakeOut): d We have free WIFI available while you dine in at our restaurant. When you arrive, please see the cashier to pay for your order and pickup your pizza. We look forward to your arrival!
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
Related questions
Question
Part 2:
Now follow the instructions to create a class named PizzaPalaceFinal
-
-
- Open Eclipse.
- Select the project Chap7-PizzaPalaceFinal in the left pane.
- Next, create a New -> Class. Name it PizzaPalaceFinal and check the first checkbox under "Which method stubs would you like to create?" and click Finish.
- Delete the green comment text in the file "PizzaPalaceFinal.java"
- Add a comment at the top // (your name)
- Add another comment at the top // Exercise 7
- Copy the code from your PizzaPalace.java file from Project 6 and paste it into this file. Save the file. (Attached to this question is the code for PizzaPalace.java)
- Edit your code for this file to implement an array of pizzas. This change will only require modifications to your file "PizzaPalaceFinal.java":
- Requirements:
- Create an array of Pizza objects named pizzas and size it to the number of Pizzas specified by the user
- After you created each pizza object and verified it was correct, add code to store the pizza object in the array pizzas
- Add another for-loop to spin through the objects in the array pizzas:
- calculate the price of each pizza in the array
- add the price to the order total
-
Test your code to verify that it works.
Sample Output:
Welcome to Pizza Palace!! Let's take your order!!
Enter your first and last name seperated by a space: Jason Tatum
How many pizzas would you like to order: 3
Pizza #1
What size pizza? (1=small, 2=medium, 3=large): 1
What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 1
Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage
How many toppings would you like? (0-5): 0
Please verify your order: Small ThinCrust Toppings= $12.00
Is this correct? (y=yes or n=no): y
Pizza #2
What size pizza? (1=small, 2=medium, 3=large): 2
What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 2
Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage
How many toppings would you like? (0-5): 2
topping #1 : p
topping #2 : m
Please verify your order: Medium ThickCrust Toppings=Pepperoni+Mushroom $19.00
Is this correct? (y=yes or n=no): y
Pizza #3
What size pizza? (1=small, 2=medium, 3=large): 3
What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 3
Here are our toppings: p=Pepperoni m=Mushroom g=GreenPepper o=Onion s=Sausage
How many toppings would you like? (0-5): 3
topping #1 : g
topping #2 : o
topping #3 : s
Please verify your order: Large StuffedCrust Toppings=GreenPepper+Onion+Sausage $24.00
Is this correct? (y=yes or n=no): y
Jason Tatum , your order has been placed.
Your total with tax is: $58.44
Is this for Dine-In or Take-Out? (d=DineIn t=TakeOut): d
We have free WIFI available while you dine in at our restaurant.
When you arrive, please see the cashier to pay for your order and pickup your pizza.
We look forward to your arrival!
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education