Question: Considering the following class: public class Shape ( private boolean filled; private int color; public Shape (int c, boolean p) ( color = c;
Considering the following class: public class Shape ( private boolean filled; private int color; public Shape (int c, boolean p) ( color = c; filled = b; } // 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): B. Shape triangle = new Shape(): OC. Shape square = new Shape(17/5. false): O D. None of the above
Step by Step Solution
3.43 Rating (153 Votes )
There are 3 Steps involved in it
The image shows a Java class named Shape with two private member variables boolean filled and int co... View full answer
Get step-by-step solutions from verified subject matter experts
