Prachi K.

asked • 12/04/21

Write a Java program using decorators

Suppose you are to write a program for a Pizza Store. The store offers pizzas with

two basic types: ThinCrust and Regular. Depending upon the customer

demands, their pizzas may be customized by adding cheese, olive, and chicken-

chunks. ThinCrust has a price of Rs. 100, and the Regular has Rs. 80. Cheese adds

cost of Rs. 70, olive Rs. 55 and Chicken-chunks Rs. 65. Customers’ order can be

of types: ThinCrust with double cheese, Regular with cheese, Regular with olive

and chicken-chunks etc. Your program should support billing of such orders for

the existing pizza types and add-ons. Also, your program should be capable

enough to support future additions in basic pizza types and add-ons.

(1) Create a design solution for the problem discussed above.

(2) Write a program to justify the design

1 Expert Answer

By:

Rize S. answered • 03/23/23

Tutor
New to Wyzant

Senior IT Certified Trainer, IT Developer & DBA Administrator

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.