Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Java please comment code Inheritance is a powerful relational and classifi

ID: 3813270 • Letter: U

Question

Using Java

please comment code

Inheritance is a powerful relational and classification tool. Consider the following: Bikes, cars, trains, planes, and more are all vehicles. There are certain properties that are shared by each, but they also have very different properties. There are also very specific subclasses of each type. The statement "humans are mammals, mammals are animals, animals are organisms" is a simplification of just one branch in the hierarchical Tree of Life. All products bought and sold have price and quantity in common, but not all products are similar. General classifications of products include raw materials, refined materials, manufactured products, services, labor, and even ideas. Within each of these classes are more and more levels of classifications. Practice relational classification of any of the concepts listed (or your own interests) by developing a set of classes that all inherit from one class. Start with broad classifications and then explore subclasses within each level. Try to develop three levels of inheritance.

Explanation / Answer

public class Bus implements Vehicle
{

@Override
public Integer getNumberOfSeats()
{
return 5;
}

@Override
public Integer getNumberOfWheels()
{
return 6;
}

@Override
public String getVehicleType()
{
return "Bus";
}

public Integer getNumberOfDoors()
{
return 4;
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote