Question: 1 Implement Drivable Open the le Drivable . java and inspect the interface we have given you. The Drivable interface contains two methods that every


1 Implement Drivable Open the le Drivable . java and inspect the interface we have given you. The Drivable interface contains two methods that every implementing class MUST have, which are movingForwaIdO and movingBackvardO. We know we want what we drive to move in those two directions but we don't care how, we leave that specicatiOn fer the class to decide. Now, write an implementation for the following two classes. a public class Bike implements Drivable This Class should be an implementation of the interface Drivable. java. Make each method write the name of the class + \"Moving\" and then the direction (forwards or backwards). 0 public class Scooter implements Drivable This class should be an implementation of the interface Drivable. java. Make each method write the name of the class + \"Moving\" and then the direction (forwards or backwards). For example, calling movingBackwardC) on a Bike object should output \"Bike Moving Backward\". Milestone 1: To test your classes, create a le VehicleTester. java that contains a. main method that tests each of your move methods, and show your code to your TA
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
