Answered step by step
Verified Expert Solution
Link Copied!

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 record-keeping 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 59 here: CS 143 Lecture 03 Inheritance Composition and Overriding Methods.pptx)
Create the 3 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions