subject

You are going to write a program which will contain the following objects using inheritance. The objects are Person, Student, Undergraduate and Graduate Student Person will contain the instance variable name, Student will inherit from Person and will contain student ID number, Undergraduate will inherit from Student and will contain grade level (freshmen, sophomore, junior or senior) and Graduate Student will inherit from Student and contain its major. Each class will contain a print method (called print) which will print out all information about the object (including the information it inherits).
In undergraduate and graduate, the classes will also include a method called equals which will determine if an undergraduate is the same grade level as another (passed in as a parameter) comparing its level and if a Graduate Student has the same major.
Allow the user to input an array of Person (max 10) and perform the following operations,
Print all Persons
Print all Students
Print all Undergraduates
Print all Graduate Students
Input a Grade Level or Major and print those Persons already in the array that have the same grade or major.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:40
Microsoft introduced active directory with windows 2000. in server 2012, it is in now version 4. what are some new features in the new ad that were not present in windows 2000 ad?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
You know the right answer?
You are going to write a program which will contain the following objects using inheritance. The obj...
Questions