/** * MountainBike class inherits all attributes and methods from GenericBike class * GenericBike defines the method setWheelSize and getWheelSize as being abstract, * thus there isn't any implementation and the keyword abstract tells us that * we must implement those methods in our subclasses */ import java.sql.Time; public class MountainBike extends GenericBike implements Rideable { public MountainBike() { super.setBikeSpeed(super.NINE_SPEED); super.setWheelSize(26); } public int getRotationalSpeed() { System.out.println( "Mountain Bike - Rotational Speed" ); /* This method might be calculated by taking into consideration the terrain the weight of the ride, the force the rider is excerting on the pedals, and the friction the terrain causes on the tires. For simplicity sake, I'll just return 36 mph here. */ return 36; } public void rideAction( int force ) { } public void stopAction() { } public void startTimeRide() { } public int getAverageSpeed() { return 0; } public Time getTimeOfRide() { return new Time(00000000); } }