Question 2 0 out of 10 points 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 determinePerson TypeCount 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 determine Person TypeCount(Person[] people){ // Place your code here } Question 1 2 out of 10 points You have been give three data definition classes, Home, NewBuild, and Fixer Upper. NewBuild and Fixer Upper extend the Home superclass. All three classes are concrete classes. Your client states that they need to be able to calcuate the minimum deposit amount for each home type. You decide that a method should be added in the Home superclass that will force the FixUpper and NewBuild subclasses to overwrite it. In Java, write the appropriate method called deposit Needed for the Home superclass. The deposit Needed method should return a double. Also, using course terminology, explain any other changes in the Home class that would be needed in order for the Home class to successfully compile.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

Answer two JAVA OOP problems.

Question 2
0 out of 10 points
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
determinePerson TypeCount 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 determine Person TypeCount(Person[] people){
// Place your code here
}
Transcribed Image Text:Question 2 0 out of 10 points 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 determinePerson TypeCount 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 determine Person TypeCount(Person[] people){ // Place your code here }
Question 1
2 out of 10 points
You have been give three data definition classes, Home, NewBuild, and Fixer Upper. NewBuild
and Fixer Upper extend the Home superclass. All three classes are concrete classes. Your client
states that they need to be able to calcuate the minimum deposit amount for each home type. You
decide that a method should be added in the Home superclass that will force the FixUpper and
NewBuild subclasses to overwrite it.
In Java, write the appropriate method called deposit Needed for the Home superclass. The
deposit Needed method should return a double. Also, using course terminology, explain any other
changes in the Home class that would be needed in order for the Home class to successfully compile.
Transcribed Image Text:Question 1 2 out of 10 points You have been give three data definition classes, Home, NewBuild, and Fixer Upper. NewBuild and Fixer Upper extend the Home superclass. All three classes are concrete classes. Your client states that they need to be able to calcuate the minimum deposit amount for each home type. You decide that a method should be added in the Home superclass that will force the FixUpper and NewBuild subclasses to overwrite it. In Java, write the appropriate method called deposit Needed for the Home superclass. The deposit Needed method should return a double. Also, using course terminology, explain any other changes in the Home class that would be needed in order for the Home class to successfully compile.
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr