OOP Removal
OOP Removal
package removal;
/**
* @author amorin
*/
/**
*/
myCar.startEngine();
myMotorcycle.startEngine();
myCar.stopEngine;
Motorcycle.stopEngine;
}
}
Superclass:
package removal;
/**
* @author amorin
*/
these.brand = brand;
these.years = years;
return brand;
this.brand = brands;
}
return year;
this.year = year;
Subclasses: Car
package removal;
/**
* @author amorin
*/
return numberOfDoors;
this.numberOfDoors = numberOfDoors;
@Override
@Override
Subclass: Vehicle
package removal;
/**
* @author amorin
*/
this.hasSidecar = hasSidecar;
return hasSidecar;
this.Sidecar = Sidecar;