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, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
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
question
Social Studies, 28.06.2019 02:30
Questions on the website: 13722362