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.
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.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 9 images