Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose we are designing a simple college record - keeping program that has records for students and faculty. Create a program that would have the
Suppose we are designing a simple college recordkeeping program that has records for students and faculty. Create a program that would have the following natural hierarchy for grouping these record types:
They are all records of people inheriting from class Person
Students. They have the following properties:
Name, StudentNumber, Major, and Level freshman sophomore, junior, senior
Instructors. Instructors have the following properties:
Name, ID Salary. However, the salary is a property in the job class can be found in slide here: CS Lecture Inheritance Composition and Overriding Methods.pptx
Create the classes above Person Student, and Instructor and take the Job class from the slide mentioned above. For all the classes, includethe following:
The properties of all classes as they are mentioned above,.
The setters and getters for those properties
A print method that prints the info of all the properties for each class
In your main method, create a student object and an instructor object.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started