i need some help!
An application is composed of 4 classes:Vehicle, Car,Motorcycle, and Truck. Thefollowing code describes the relationships between theseclasses.
class Vehicle {
int wheels = 4;
public void engineStart() {
System.out.println(“Enginestarted. . .”); }
public void drive() {
System.out.println(“Driving onthe pavement on ” + wheels + ” wheels”); }
}
class Car extends Vehicle {
public Car() {
System.out.println(“I’m acar:”); }
public void doorLock() {
System.out.println(“Locking alldoors.”); }
}
class Motorcycle extends Vehicle {
// Hides the data of the parent class.
int wheels = 2;
public Motorcycle() {
System.out.println(“I’m amotorcycle:”); }
public void riding() {System.out.println(“Riding on” + wheels
PayPal Gateway not configured
PayPal Gateway not configured