In this java project, you are asked to write a program for a Pizza store to process pizza orders. Suppose that they receive 10 orders in one hour, each order includes the following information: Name of the customer, size of the pizza, topping of the pizza, and distance for delivery. The charge information on a order: 1. There are 3 sizes of pizza: small, medium and large. Basic price of a pizza is: small - $8, medium-$12; large-$16. 2. No additional charge for Cheese topping. For pepperoni topping, the additional charge is $1. For sausage topping, the additional charge is $2. Note that the additional charge is same for different sizes of pizzas. 3. If the distance is 0 (i.e. self-pickup), no delivery fee. If it is between 0 and 1 mile, the delivery fee is $2. If it is more than 1 mile, it is $2 plus $0.50/mile for mileage over 1 (i.e. if it is 1.5 miles , the total charge is 2 + 0.5*(1.5 -1) = 2.25).   Requirements on your programs: 1. Create and define a PizzaOrder class. Basic attributes: Order ID (1-10), Customer name, Size of the pizza, topping of the pizza, and distance for delivery. Basic methods: constructor, getters and setters for each attribute, method for computing the delivery fee, method for computing the topping fee, and method for computing the total charge (including the basic price, topping fee, and delivery fee) on a pizza order. 2. In your main class file: Prompt the user to input detailed information for each of 10 pizza orders. Remind the customers about all possible choices of size and topping. Create an object for each pizza order using array of objects. Compute the total charge for each pizza order and the total revenue for all 10 orders. Print the order information for each of the 10 pizzas in a table format. Information to be printed: Pizza order ID (1-10), Customer name, Size of the pizza, topping of the pizza, distance for delivery, total charge. Print the total revenue at the end.

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

In this java project, you are asked to write a program for a Pizza store to process pizza orders. Suppose that they receive 10 orders in one hour, each order includes the following information: Name of the customer, size of the pizza, topping of the pizza, and distance for delivery. The charge information on a order:

1. There are 3 sizes of pizza: small, medium and large. Basic price of a pizza is: small - $8, medium-$12; large-$16.

2. No additional charge for Cheese topping. For pepperoni topping, the additional charge is $1. For sausage topping, the additional charge is $2. Note that the additional charge is same for different sizes of pizzas.

3. If the distance is 0 (i.e. self-pickup), no delivery fee. If it is between 0 and 1 mile, the delivery fee is $2. If it is more than 1 mile, it is $2 plus $0.50/mile for mileage over 1 (i.e. if it is 1.5 miles , the total charge is 2 + 0.5*(1.5 -1) = 2.25).

 

Requirements on your programs:

1. Create and define a PizzaOrder class. Basic attributes: Order ID (1-10), Customer name, Size of the pizza, topping of the pizza, and distance for delivery. Basic methods: constructor, getters and setters for each attribute, method for computing the delivery fee, method for computing the topping fee, and method for computing the total charge (including the basic price, topping fee, and delivery fee) on a pizza order.

2. In your main class file:

  • Prompt the user to input detailed information for each of 10 pizza orders. Remind the customers about all possible choices of size and topping.
  • Create an object for each pizza order using array of objects.
  • Compute the total charge for each pizza order and the total revenue for all 10 orders.
  • Print the order information for each of the 10 pizzas in a table format. Information to be printed: Pizza order ID (1-10), Customer name, Size of the pizza, topping of the pizza, distance for delivery, total charge.
  • Print the total revenue at the end.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 9 images

Blurred answer
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
  • SEE MORE 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