Question 5
Not yet
answered
Flag question
Analyze the following Java code:
public class Vehicle {
private String type;
public Vehicle(String type) {
this.type = type;
}
}
// Assume getters and setters are present
public class Car extends Vehicle {
private int wheels;
}
public Car(String type, int wheels) {
super(type);
this.wheels wheels;