Question: Considering the following class: public class Shape{ private boolean filled; private int color; public Shape(boolean b, int c){ color = c; filled = b; }
Considering the following class:
public class Shape{
private boolean filled;
private int color;
public Shape(boolean b, int c){
color = c;
filled = b;
}
// assume setters, getters and toString() are provided
}
Which of the following statements in a test class will be valid?
A.
Shape circle = new Circle( true, 7) ;
B.
Shape circle = new Shape( -2 <= 3 , 16) ;
C.
Shape square = new Shape() ;
D.
None of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
