I did my homework that makes some program which has to use adapter pattern.
But I'm not sure about I used adaptor pattern in homework.
Can you check my diagram and adaptor pattern used?
I designed Car, Plane, Submarine as a adaptor classes which connect Vehicle super class and PrintStates interface.
Am I right?
There are 5 menu options (P)lane, (C)ar, (S)ubmarine, (B)lackbox, (H)alt and if user input button P/C/S, then all states of that object has shown, button B is the history of user's select and states of objects. Lastly, button H is to exit program.
Below is the execution of program.