Question: QUESTION 3 [35 Marks] 1) public class MctBuilding { public int sqrFeet; private String name; BCS2143 Page 2 of 3 MODEL EXAM protected double cost;
![QUESTION 3 [35 Marks] 1) public class MctBuilding { public int](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d760f041c62_08766d760ef8d8f5.jpg)
QUESTION 3 [35 Marks] 1) public class MctBuilding { public int sqrFeet; private String name; BCS2143 Page 2 of 3 MODEL EXAM protected double cost; public MctBuilding0 } protected boolean isBuilt() {...} public void moveIn() {...} public double rentSpace() {...} private int renovate int days) { ... } } a. Which members are visible to accessible from) MetBuilding and its subclasses? [1 mark] b. Which members are visible only to (accessible from) the MetBuilding class? [1 mark] Which members are visible to accessible from) any class? [1 mark] d. For which field(s) we should write getter(s) and setter(s) for, so classes outside MetBuilding and its inheritance hierarchy can access it(them)? [1 mark] e. Write default constructor and what is its purpose? [1 Mark] E [. Does default constructor return any value? Justiy. [2 Marks] 2) Define the following terms used in Java? 18 Marks u tha c) final 20 Lecture 1 chapter 3) Write program for add, subtract, multiply. divide in a calculator application [20 Marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
