abstract class Vehicle
{
abstract int getSpeed();
}
class Bike extends Vehicle
{
int getSpeed()
{
return 60;
}
}
class Car extends Vehicle
{
int getSpeed()
{
return 70;
}
}
public class TestVehicle
{
public static void main(String args[])
{
Vehicle bike = new Bike();
Vehicle car = new Car();
int bikespeed = bike.getSpeed();
int carspeed = car.getSpeed();
System.out.println("Speed of Bike is: "+bikespeed+" Km/h");
System.out.println("Speed of Car is: "+carspeed+" Km/h");
}
}