Select Page

Stratford University Inheritance and Polymorphism Project

Question Description

Please note there are two parts to lesson 6 and two videos

Part A: OOP- Inheritance. Watch the video on inheritance.

VIdeo Link: https://online.stratford.edu/pluginfile.php/186146…

2) Recreate the vehicle and car classes.

3) Create a new class that extends the vehicle class. Instantiate an object of this new class and demonstrate inheritance by using elements of the super or parent class.

Here is the Vehicle Class:

public class Vehicle {

private int numberOfWheels=0;

private int currentSpeed=0;

private String color=””;

public Vehicle(int n, int s, String c){

this.numberOfWheels=n;

this.currentSpeed=s;

this.color=c;

}

public void setCurrentSpeed(int s){

this.currentSpeed=s;

}

public void startVehicle(){

System.out.println(“VROOOMMMMMMM”);

this.currentSpeed=0;

}

}

Part 2: OOP: Polymorphism and Method overloading.

1) Watch the video on getters/setters and method overloading

Video Link: https://online.stratford.edu/pluginfile.php/186146…

2) Demonstrate Polymorphism

3)Recreate the method overloading examples in the video

4) Create your own method to overload

5) We have actually been overloading two methods every week in this course. Name at least one of the classes and the associated method we overloaded this term? Can you identify both of them?

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now