1. int x;
x = Math.max(7, 8);
2. A ball object is like a Sphere object, but it has the additional features of being able to move left and move right. Write a class called Ball which inherits the class Sphere but provides additional methods moveLeft and moveRight.
3.A coloured sphere is like a sphere, but with some colour. Write a new class named ColoredSphere that extends Sphere to provide a colour that can be set when the balloon is created. This is accomplished using a constructor method, so that your class should enable the following to be written:
ColoredSphere coloredSphere =
new ColoredSphere(Color.red);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here