Which statement about an object of Class Rectangle is NOT true? class Rectangle{ private double width, height;
Question:
Which statement about an object of Class Rectangle is NOT true?
class Rectangle{
private double width, height;
public double getWidth(){
return width;
}
}
a.
The object must be placed in the memory during the execution.
b.
If the object is created by the default constructor created by the compiler, the value of width and height are zero.
c.
Rectangle objects created in the same place may have the same state and the same behaviour, but must have different identities.
d.
In order to access the state of the object from a different class, the public method getWidth() must be used.
e.The object must contain a value for the field width and height, but does not contain an instance of the method getWidth().
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell