1.
Consider the following two classes:
public class ClassA {
    public void methodOne(int i) {
    }
    public void methodTwo(int i) {
    }
    public static void methodThree(int i) {
    }
    public static void methodFour(int i) {
    }
}
public class ClassB extends ClassA {
    public static void methodOne(int i) {
    }
    public void methodTwo(int i) {
    }
    public void methodThree(int i) {
    }
    public static void methodFour(int i) {
    }
}
a. Which method overrides a method in the superclass?
b. Which method hides a method in the superclass?
c. What do the other methods do?
2. What does the method PrintStuff() print?
public class Vehicle {
public String toString() {
return "Vehicle";
}
}
public class Motorized extends Vehicle {
public String toString() {
return "Motor";
}
}
public class Car extends Motorized {
public String toString() {
return super.toString()+" and Car";
}
}
void printStuff() {
Vehicle v = new Vehicle();
System.out.println(v);
Motorized m = new Motorized();
v = m;
System.out.println(m);
System.out.println(v);
System.out.println((Motorized) v);
Car c = new Car();
m = c;
v = c;
System.out.println(c);
System.out.println(m);
System.out.println(v);
System.out.println((Car) v);
System.out.println((Car) m);
System.out.println((Motorized) v);
}
3. Finish the constructor for the KickBall class.
public class Ball {
public double diameter;
public Ball(double diam) {
diameter = diam;
}
}
public class KickBall extends Ball {
private Color ballColor;
public KickBall(double diam, Color color) {
}
}