Question: I need explanation for question 5 and question 6. For question 5, why does not it cause compile error? and for number six, why is

I need explanation for question 5 and question 6. For question 5,I need explanation for question 5 and question 6. For question 5, why does not it cause compile error? and for number six, why is it compile error?

public abstract class House private int size public static int numPeople1; public void temperaturelint cost) public House( Public House(int size} { publia int getsise ( public class UCSDDorm extends House implements Habitable( publia UCSDDorm(int size super (size public UCSDDorm //empty constructor public void repair (double cost) System. out-printin("A lot of money"cost public void temperature int cost ystem.out.println ("temperature atco 10) Assume that the following statements are from a main method in a tester class. Answer whether the following statements will cause a compiler error, a runtime error, or no e all. If there is no error, write the output from the code snippet. These statements are not sequential to each other System.out , printIn(h. getSize () ); 9ystem out println(r.numPeople); l VersionA Answer Answer 4 Habitable p new UC3DDorm (100) 3ystem.out-printin(p.getsise Answer s.repair (3.14); Answer Version A I House Pnew UCSDDorm) System-out-println ( p.temperature (12) Habitable h new UCSDDorm 3ystem. out println House)h) getsize) Answer ); Version A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!