Question: Concepts Tested in this Program: ? Class Design ? Constructors ? Objects ? Inheritance Program: Design a class named Person and its two subclasses, Student

Concepts Tested in this Program: ? Class Design ? Constructors ? Objects ? Inheritance Program: Design a class named Person and its two subclasses, Student and Employee. Make Faculty and Staff subclasses of Employee. A Person object has a name, address, phone number, and email address (all Strings). A Student Object has a class status (freshman, sophomore, junior, or senior). Define the status as a final String variable. An Employee Object has an office number, salary (both ints ), and a date hired. Use the MyDate class defined below to create an object for date hired: public class MyDate { private String date; public MyDate(String date){ this.date = date; } public String getDate() { return date; } } A Faculty object has office hours and a rank (both Strings), while a Staff object has a title (as a String). For the Student, Faculty, and Staff classes, create toString methods that store information about the object (in the format shown in the examples below). Test your classes in a Driver class (within the same file) that asks the user what type of object they would like to create as well as what information they would like it to have. The program should then use the object's toString method to print information about that object.

Sample Run #1

1. To Create a Student.

2. To Create an Employee.

Choice 1:

Enter a name: ABC

Enter ABC's address: XYZ

Enter ABC's phone number: 123

Enter ABC's email address: qweat

Enter ABC's class status: Junior

Student: ABC

Status: Junior

Address: XYZ

Phone Number: 123

Email Address: qweat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!