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 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
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
History, 10.10.2021 15:20
question
Mathematics, 10.10.2021 15:20
question
Mathematics, 10.10.2021 15:20
question
Mathematics, 10.10.2021 15:20
Questions on the website: 13722359