There are two parts to this practice exercise! (NOT GRADED) Just for you to continue working on your skills over this weekend.  Part I:  Now follow the instructions to create a new class named Pizza: Open Eclipse. Create a New  -> Java project.  Name it Chap6-PizzaPalace  and click Finish and OK. Next, create a New -> Class.  Name it Pizza  and DO NOT check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "Pizza.java" Add a comment at the top // (your name) Add another comment at the top // Practice 6 Study the UML provided with this practice problem. Code class Pizza according to the UML given, be sure to include all data fields, methods, and variables as specified.   (USE THE UML DIAGRAM ATTACHED TO BASE/structure of your code off of for Part 1) Part 2:  Now follow the instructions to create a new class named PizzaPalace Open Eclipse. Select the project Chap6-PizzaPalace in the left pane. Next, create a New -> Class.  Name it PizzaPalace 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 "PizzaPalace.java" Add a comment at the top // (your name) Add another comment at the top // Practice 6 Study the output given below to create a program to produce the output given below. Requirements: Use a for-loop to process each pizza order Use a for-loop to process each topping Use your full-arg constructor to create each Pizza object with the input data Call your toString() method to print each pizza's data Format monetary values to 2 decimal places with printf  *Hint:  Program one part at a time and test each part as you go along.  Don't worry about error checking the user input until you have a working program.  Test your code to verify that it works. Sample Outputs: 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: 2   Pizza #1 What size pizza? (1=small, 2=medium, 3=large): 1 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 : s Please verify your order: Small ThickCrust Toppings=Pepperoni+Sausage Is this correct? (y=yes or n=no): y The price of your pizza is: $16.00   Pizza #2 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 : m topping #2 : g topping #3 : o Please verify your order: Large StuffedCrust Toppings=Mushroom+GreenPepper+Onion Is this correct? (y=yes or n=no): y The price of your pizza is: $24.00   Jason Tatum, your total with tax is: $42.50 Is this for Dine-In or Take-Out? (1=dineIn 2=takeout): 2 You can park in the designated order pickup spots in front. ____________________________________________________________________________________________________________________________ Welcome to Pizza Palace!! Let's take your order!! Enter your first and last name seperated by a space: David Pastrnak How many pizzas would you like to order: 1   Pizza #1 What size pizza? (1=small, 2=medium, 3=large): 5 oops, try again... What size pizza? (1=small, 2=medium, 3=large): 1 What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 4 oops, try again... 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): 6 oops, try again... How many toppings would you like? (0-5): 1 topping #1 : s Please verify your order: Small ThinCrust Toppings=Sausage Is this correct? (y=yes or n=no): y The price of your pizza is: $14.00   David Pastrnak, your total with tax is: $14.88 Is this for Dine-In or Take-Out? (1=dineIn 2=takeout): 1 We have free WIFI available while you dine in at our restaurant.

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
icon
Related questions
Question
There are two parts to this practice exercise! (NOT GRADED) Just for you to continue working on your skills over this weekend. 
Part I: 
Now follow the instructions to create a new class named Pizza:
      1. Open Eclipse.
      2. Create a New  -> Java project.  Name it Chap6-PizzaPalace  and click Finish and OK.
      3. Next, create a New -> Class.  Name it Pizza  and DO NOT check the first checkbox under "Which method stubs would you like to create?" and click Finish.
      4. Delete the green comment text in the file "Pizza.java"
      5. Add a comment at the top // (your name)
      6. Add another comment at the top // Practice 6
      7. Study the UML provided with this practice problemCode class Pizza according to the UML given, be sure to include all data fields, methods, and variables as specified.  

(USE THE UML DIAGRAM ATTACHED TO BASE/structure of your code off of for Part 1)

Part 2: 

Now follow the instructions to create a new class named PizzaPalace

      1. Open Eclipse.
      2. Select the project Chap6-PizzaPalace in the left pane.
      3. Next, create a New -> Class.  Name it PizzaPalace and check the first checkbox under "Which method stubs would you like to create?" and click Finish.
      4. Delete the green comment text in the file "PizzaPalace.java"
      5. Add a comment at the top // (your name)
      6. Add another comment at the top // Practice 6
      7. Study the output given below to create a program to produce the output given below.
      8. Requirements:
        1. Use a for-loop to process each pizza order
        2. Use a for-loop to process each topping
        3. Use your full-arg constructor to create each Pizza object with the input data
        4. Call your toString() method to print each pizza's data
        5. Format monetary values to 2 decimal places with printf 

*Hint:  Program one part at a time and test each part as you go along.  Don't worry about error checking the user input until you have a working program. 

Test your code to verify that it works.

Sample Outputs:

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: 2

 

Pizza #1

What size pizza? (1=small, 2=medium, 3=large): 1

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 : s

Please verify your order: Small ThickCrust Toppings=Pepperoni+Sausage

Is this correct? (y=yes or n=no): y

The price of your pizza is: $16.00

 

Pizza #2

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 : m

topping #2 : g

topping #3 : o

Please verify your order: Large StuffedCrust Toppings=Mushroom+GreenPepper+Onion

Is this correct? (y=yes or n=no): y

The price of your pizza is: $24.00

 

Jason Tatum, your total with tax is: $42.50

Is this for Dine-In or Take-Out? (1=dineIn 2=takeout): 2

You can park in the designated order pickup spots in front.

____________________________________________________________________________________________________________________________

Welcome to Pizza Palace!! Let's take your order!!

Enter your first and last name seperated by a space: David Pastrnak

How many pizzas would you like to order: 1

 

Pizza #1

What size pizza? (1=small, 2=medium, 3=large): 5

oops, try again...

What size pizza? (1=small, 2=medium, 3=large): 1

What type crust? (1-ThinCrust, 2= ThickCrust, 3=StuffedCrust): 4

oops, try again...

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): 6

oops, try again...

How many toppings would you like? (0-5): 1

topping #1 : s

Please verify your order: Small ThinCrust Toppings=Sausage

Is this correct? (y=yes or n=no): y

The price of your pizza is: $14.00

 

David Pastrnak, your total with tax is: $14.88

Is this for Dine-In or Take-Out? (1=dineIn 2=takeout): 1

We have free WIFI available while you dine in at our restaurant.

 

UML Diagram for the Pizza Class
Pizza
// "Small", "Medium", or "Large"
-size: String
- crust: String
// "Thick", "Thin", or "Stuffed"
- toppings: String //ex: "Pepperoni+Mushroom+GreenPepper"
+ Pizza(s: String, c: String, t: String)
+ Pizza ()
+ setSize(s: String) : void
+ setCrust(c: String): void
+ setToppings(t : String): void
+ getSize(): String
//use: "tbd", "tbd", "tbd"
+ getCrust(): String
+ get Toppings(): String
+ calcPrice(): double //use: small-$12.00, medium=$15.00, large=$18.00 add $2.00 per topping
+ equals(p2 : Pizza): boolean
+ toString(): String
Transcribed Image Text:UML Diagram for the Pizza Class Pizza // "Small", "Medium", or "Large" -size: String - crust: String // "Thick", "Thin", or "Stuffed" - toppings: String //ex: "Pepperoni+Mushroom+GreenPepper" + Pizza(s: String, c: String, t: String) + Pizza () + setSize(s: String) : void + setCrust(c: String): void + setToppings(t : String): void + getSize(): String //use: "tbd", "tbd", "tbd" + getCrust(): String + get Toppings(): String + calcPrice(): double //use: small-$12.00, medium=$15.00, large=$18.00 add $2.00 per topping + equals(p2 : Pizza): boolean + toString(): String
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

This program obviously says to use eclipse and you decided to do it using Python, this is extremely incorrect and wasted my time. 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Random Class and its operations
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.
Similar questions
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education