Question: ?This is using Java 1.overload the makeCircle method of following code such that if the Color parameter is not provided, the circle's color will default
?This is using Java
1.overload the makeCircle method of following code such that if the Color parameter is not provided, the circle's color will default to red.
2.overload the makeCircle method of following code such that if the radius is not provided, a random radius in the range in the range 10 to 20.
3.overload the makeCircle method of following code such that if both the color and radius are not provided, the color wll default to green and the radius will default to 40.
code:
import javafx.scene.paint.Color; import javafx.scene.shape.Circle;
public class MakeObjects {
public static Circle makeCircle(int x, int y, int radius, Color color) { return new Circle(x, y, radius, color); }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
