Question: **java program** Create an Interface Vehicle with method changeGear(int a), speedUp(int a) and applyBrakes(int a). Create two classes bicycle and bike which will implement Vehicle
**java program**
Create an Interface Vehicle with method changeGear(int a), speedUp(int a) and applyBrakes(int a). Create two classes bicycle and bike which will implement Vehicle interface. Both classes contain two attributes speed and gear. Where changegear method set the value of gear and speedup for increasing the speed and applyBrakes for decreasing the speed. In the main method create one instance of bicycle and one instance of bike class. Perform three operation on this two objects and display the information.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
