Question: You have been given three data definition classes, Home, New build, and FixerUpper. NewBuild and FixerUpper ectend the Home Superclass. All three classes are concrete
You have been given three data definition classes, Home, New build, and FixerUpper. NewBuild and FixerUpper ectend the Home Superclass. All three classes are concrete classes. Your client states that they need to be able to calculate the minimum deposit amount for each home type. You decided that a method should be added in the Home superclass that will force the FixerUpper and Newbuild subclasses to overwrite it.
In java, write the appropriate method called depositNeeded for the Home superclass. The depositNeeded method should return a double. Also, using course terminology, explain any other changes in the Home class to successfully compile.
Question2 Assume you have three data definition classes, Person , Student, and Faculty. The Student and Faculty classes extend Person. Given the code snippet below, In java complete the method determinePersonTypeCount to print out how many Student and Faculty objects exist within the Person array. You may assume that each object within the person[] is either referencing a student or Faculty object.
public static void determinePersonTypeCount(Person[] people){
//place your code here
}
Step by Step Solution
There are 3 Steps involved in it
Heres the implementation for the given tasks Home Class public abstract class Home Other existing co... View full answer
Get step-by-step solutions from verified subject matter experts
