Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pizzas sold at Pizza Delight have three different kinds of crusts: hand-tossed, thin, and thick. The size of a pizza can be small, medium, or

image text in transcribed
Pizzas sold at Pizza Delight have three different kinds of crusts: hand-tossed, thin, and thick. The size of a pizza can be small, medium, or large. Toppings that can be added to a pizza are pepperoni, beef, mushrooms, green pepper, tomato, olive, and sausage. Customers decide the size, crust, and toppings of the pizzas they want. 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 S14.50 for a large pizza. Each topping costs $1.50. You decide the data types Design a class named Pizza which has three fields: crust, size, and toppings. and values which can be assigned to these fields. In addition to the constructor and three instance methods, each returning one of the fields, there is also a method called costOfPizza which returns the cost of the pizza based on the size, crust, and toppings of that pizza. pizzas from one her customers. The order is stored in a textfile the program is executed. The number of pizza The store just received an order of Name of the file will be passed to the program w 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 may consist of more than one pizza. The progr the order followed by the amount due. The output of the pizza is arranged in od of each pizza. The program also displays the total cost of the order with a 10% tax rate. hen Pizza Delight in processing the order stored in the textfile. An order am displays the detail information about each pizza in descending order on cost Listed below is a sample input data file with an order Thin, medium Spanish, Green Pepper, Sausage hand-tossed, large Pineapple, Mushroom, Tomato, Onion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago