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...


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);




May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here