Question: Java Program: Use the Decorator pattern to implement a photo booth.. There should be an abstract Photo class Has an abstract cost() method that returns

Java Program: Use the Decorator pattern to implement a photo booth..

There should be an abstract Photo class

Has an abstract cost() method that returns the cost of the photo

There should be 2 types of photos

Color: $1

Black and white: $2

Each photo has the following options:

Frame: extra $2

Glossy: extra $1

Digitally corrected: extra $4

Write a test class that demonstrates the creation of two instances of photos (using the decorator pattern we covered in class):

A color one that is framed and glossy

A black and white one that is extra glossy (apply glossy twice) and has been digitally corrected

The test class should also demonstrate printing out the true cost of each of the 2 photo configurations specified in the previous instruction

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!