Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q4 Answer Q4(a)-Q4(e) based on Figure Q4(a) and Figure Q4(b). Line 1 Code //House.java package myhome; LOCO public class House ! private int noofRoom; private

image text in transcribedimage text in transcribed

Q4 Answer Q4(a)-Q4(e) based on Figure Q4(a) and Figure Q4(b). Line 1 Code //House.java package myhome; LOCO public class House ! private int noofRoom; private int noofToilet; public double square Feet; 8 FIGURE Q4(a) Line Code // Semi Detached.java package myhome; 4 public class SemiDetached extends House { BOUWNE 7 8 9 public static void main(String[] args) { House myHouse = new House(); myHouse.noofRoom = 4; myHouse.noofToilet = 2; myHouse. square Feet = 3000.00; 11 FIGURE Q4(b) (a) Is the code at line 8 and 9 in SemiDetached.java is legit? Justify your answer. (3 marks) (b) Rewrite House.java at line 5 and 6 for the variables can be accessed from the same class, from the same package, and from a subclass in a different package. (2 marks) BREFEROHE 5) te) Based on the code you to 4) write prolonged Thom and secret to, 900.0rpeetiety (5 marks) Based on the code you have written in Q4(b), write a class named Bungalow that inherits House in a package named mysecondhome

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

14.1

Answered: 1 week ago

Question

2. What type of team would you recommend?

Answered: 1 week ago

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago