IN JAVA COPY AND PASTE ... Write a program for a pizza restaurant orders, the program includes two parts; Pizza class a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

IN JAVA COPY AND PASTE ... Write a program for a pizza restaurant orders, the program includes two parts; Pizza class a

Post by answerhappygod »

IN JAVA COPY AND PASTE ... Write a program for a pizzarestaurant orders, the program includes two parts; Pizza class andmain. The Class: in the Pizza class, do the following: The classhas the following member variables: Type of pizza (example: deepdish, hand tossed, or pan) Size of Pizza (small, medium, or large),Use integer number codes (1, 2 and 3) to represent the size ofpizza. Number of toppings. And the following member methods:Mutator methods Accessor methods Default Constructor Constructorwith parameters Printing method: to print the pizza items (type,size and number of toppings) in a nice way of your choice. Write acomputePrice( ) method: this method computes the cost of the pizzaand returns it as a double according to the rules: Small pizza =$10 + $2.5 per topping Medium pizza = $14 + $2.5 per topping Largepizza = $17 + $2.5 per topping The main: in the main, do thefollowing: Write a main to test the Pizza class by declaring threepizza objects using the below arguments: (no need for user input)Order1: type of pizza = deep dish, size of pizza = medium (2),number of toppings = 5 Order2: type of pizza = pan, size of pizza =large (3), number of toppings = 4 Order3: type of pizza = pan, sizeof pizza = small (1), number of toppings = 2 Call the printingmethod for the three objects. Call the computePrice( ) for thethree objects and print the returned price for each object. Theexpected results of calling computePrice( ) for the above objectsare: For Order1 = $26.5 For Order2 = $27.0 For Order3 = $15.0
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply