Question: Moving to another question will save this response. Question 2 Considering the following class: public class Shape private boolean filled; private int color: public shape


Moving to another question will save this response. Question 2 Considering the following class: public class Shape private boolean filled; private int color: public shape (int c, boolean p) color - C filled - bi 2 // assume setters, getters and toString() are provided } Which of the following statements in a test class will be valid? O A. Shape triangle = new Triangle( false, 7); O B. Shape triangle = new Shape(): O C. Shape square = new Shape(1775, false); O D. None of the above 4 A Moving to another question will save this response. Moving to another question will save this response. Question 3 Assume that Circle class has the following method: public Circle nextCircle() { radius++ : return this; } Also, assume that a test class with a main method has the following statements: Point pl = new Point(1,1) Circle ci = new Circle (3, p1); Which of the following statement is valid? O A. Point p4 - center.nextCircle (c1); O B. double a = ci.nextCircle(); O C. double a = nextCircle (ci).getRadius(); OD. Circle c4= c1.nextCircle(); Moving to another question will save this response
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
