Oop Removal
Oop Removal
/*
*/
package removal;
/**
* @author amorin
*/
/**
*/
myCar.startEngine();
myMotor.startEngine;
myCar.stopEngine();
myMotorcycle.stopEngine;
System.out.println("Car brand: " + myCar.getBrand));
SUPER CLASS
/*
*/
package removal;
/**
* @author anamae
*/
private brand;
this.brand = brand;
this.year = year;
}
public String getBrand {
return brand;
this.brand = brand;
return year;
this.year = year;
}
SUBCLASS
/*
*/
package removal;
/**
* @author anamae
*/
super(brand, year);
numberOfDoors = numberOfDoors;
return numberOfDoors;
.numberOfDoors = numberOfDoors;
@Override
public void startEngine {
@Override
SUBCLASS
/*
*/
package removal;
/**
* @author anamae
*/
this.hasSidecar = hasSidecar;
hasSidecar;
this.hasSidecar = hasSidecar;