Question
The price for a pizza depends on the size of the pizza and the number of toppings added to the pizza crust. The store charges
The price for a pizza depends on the size of the pizza and the number of toppings added to the pizza crust. The store charges $9.50 for a small size pizza, $12.25 for a medium size pizza, and $14.50 for a large pizza. Each topping costs $1.50.
The store just received an order of pizzas from one her customers. The order is stored in a textfile. Name of the file will be passed to the program when the program is executed. The number of pizzas ordered is unknown. However, two lines are used to hold the information of each pizza ordered. For each pizza ordered, the first line consists of two strings separated by one comma. The first string is about the crust type (hand-tossed, thin, or thick). The second string denotes the size of the pizza (small, medium, or large). The second line holds the toppings ordered for the pizza. Write a program to assist the manager at Pizza Delight in processing the order stored in the textfile. An order may consist of more than one pizza. The program displays the detail information about each pizza in the order followed by the amount due. The output of the pizza is arranged in descending order on cost of each pizza. The program also displays the total cost of the order with a 10% tax rate.
How to manuplate the string, so that calculations can be made from the information of the text file in java. Also how to sort it from descending order.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started