Question: Then, implement the code found on pages 95 through 98 of the example posting. The printed output should be similar to that on page 98.

Then, implement the code found on pages 95 through 98 of the example posting. The printed output should be similar to that on page 98. 1. After convincing yourself that the code executes properly, replace the main program where the test cases were hard coded. Instead, have the main program create a Store object. Then have the Store object create a (singleton) condimentFactory and a Register object, passing the address of the condimentFactory to the Register. The Register then takes the orders from the keyboard. For example: New sale Darkroast Mocha Mocha Whip End sale The Register then produces and prints the full description of the coffee and condiments ordered plus the price of the coffee with its condiments. 2. Add a new condiment to the system..."sprinkles. Run some tests using the new condiment to verify your addition. Pay very close attention to what is involved in adding a new condiment to the system. What needs to be modified and what does not? Then, implement the code found on pages 95 through 98 of the example posting. The printed output should be similar to that on page 98. 1. After convincing yourself that the code executes properly, replace the main program where the test cases were hard coded. Instead, have the main program create a Store object. Then have the Store object create a (singleton) condimentFactory and a Register object, passing the address of the condimentFactory to the Register. The Register then takes the orders from the keyboard. For example: New sale Darkroast Mocha Mocha Whip End sale The Register then produces and prints the full description of the coffee and condiments ordered plus the price of the coffee with its condiments. 2. Add a new condiment to the system..."sprinkles. Run some tests using the new condiment to verify your addition. Pay very close attention to what is involved in adding a new condiment to the system. What needs to be modified and what does not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
