Question: Problem Description: A vehicle company is designing software for the Cruise Control system. The Cruise Control class will consist of two parts: (1) Lever (to
Problem Description: A vehicle company is designing software for the Cruise Control system. The Cruise Control class will consist of two parts:
(1) Lever (to control the car speed), and (2) Brake (to reduce the car speed). Because the required hardware does not exist yet, the software team needs to have simulated hardware parts to test the cruise control system. Of course, the simulated hardware parts should NOT be mixed with the real hardware parts when become available. Each product class shall have display() method to print its type. You need to do the following:
1. Use abstract factory design pattern to allow others to create objects of the Cruise control I/O
. 2. Write a simple main method to create a cruise control I/O object with simulated brake and simulated lever.
3. Call method display() of the created cruise control I/O object. This method shall call the display method of each of the composed internal objects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
