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

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!