Question: A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of
A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of type School, which of the following statements is valid?
a. Building.getFloors();
b. School.getFloors();
c. modelHigh.getFloors();
d. All of the previous statements are valid.
Step by Step Solution
3.56 Rating (163 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
