Question: Please use this program to modify the below program Please follow these requirements below. Design a class named Person i. Person has a data field:

Please use this program to modify the below program

Please use this program to modify the below program Please follow these

Please follow these requirements below. requirements below. Design a class named Person i. Person has a data

Design a class named Person i. Person has a data field: name. Default: name is "unknown", ii. Person has a method printlnfo() which will print all data fields. iii. and its two subclasses named Student and Employee. b. Design a class named Employee which is a subclass of Person. i. Employee has a data field: salary. Default: salary is 0, ii. Employee has a method printlnfo()which will print all data fields(includir data fields In super class) c. Design a class named Faculty which is a subclass of Employee. i. Faculty has a data field: dept. Default: dept is "none", ii. Faculty has a method printlnfo()which will print all data fields(including data fields in super class) d. Design a class named Student which is a subclass of Person. i. Student has two data fields: age. default 0; email address, default: "none" ii. Student has a method print Info()which will print all data fields(including data fields in super class) e. Implement necessary constructors, accessor and mutator methods for all the above classes. Write a test program to create two Students and two Faculties, assign (NOT read from console) the following information, and invokes their printlnfo methods, xxxx is your Kean ID. A Student object name: unknown, age: -1, email: none A Student object name: "demo_s2". age: 23, email: xyz@gmail.com A Faculty object name: "demo_fl", salary: -1, dept: none A Faculty object name: "demo_f2", salary: 10000. dept: "CS" Your program output should look like below: Student name: unknown, age: -1, Email: none Student name: demo_s2, age: 23, Email: xyz@gmail.com Faculty name: demo_fl, salary: -1, dept: none Faculty name: demo_f2, salary: 10000, dept: CS Program4 is developed by . This project should be coded in ONE java file. Modify program4 to meet the following requirements: Make Person, Employee classes to abstract classes. Add an interface interface working with a method teach () interface working (void teach(String course);1 Modify Faculty class.Design a class named Person i. Person has a data field: name. Default: name is "unknown", ii. Person has a method printlnfo() which will print all data fields. iii. and its two subclasses named Student and Employee. b. Design a class named Employee which is a subclass of Person. i. Employee has a data field: salary. Default: salary is 0, ii. Employee has a method printlnfo()which will print all data fields(includir data fields In super class) c. Design a class named Faculty which is a subclass of Employee. i. Faculty has a data field: dept. Default: dept is "none", ii. Faculty has a method printlnfo()which will print all data fields(including data fields in super class) d. Design a class named Student which is a subclass of Person. i. Student has two data fields: age. default 0; email address, default: "none" ii. Student has a method print Info()which will print all data fields(including data fields in super class) e. Implement necessary constructors, accessor and mutator methods for all the above classes. Write a test program to create two Students and two Faculties, assign (NOT read from console) the following information, and invokes their printlnfo methods, xxxx is your Kean ID. A Student object name: unknown, age: -1, email: none A Student object name: "demo_s2". age: 23, email: xyz@gmail.com A Faculty object name: "demo_fl", salary: -1, dept: none A Faculty object name: "demo_f2", salary: 10000. dept: "CS" Your program output should look like below: Student name: unknown, age: -1, Email: none Student name: demo_s2, age: 23, Email: xyz@gmail.com Faculty name: demo_fl, salary: -1, dept: none Faculty name: demo_f2, salary: 10000, dept: CS Program4 is developed by . This project should be coded in ONE java file.) Modify program4 to meet the following requirements: Make Persom, Employee classes to abstract classes. Asds an interface interface working with a method teach () interface working (void teach(String course)) Modify Faculty class. a. Add a private data field: course Modify Faculty class as a subclass of Employee and implement working c. Modify to String{or print Info) method to print out course in addition to the existing information. d. Modify existing Faculty constructor to accept course as parameter, and use teach method to assign the input course. Handle exceptions in Employee salary: If salary arc negative, handle the exception by append "(with invalid salary)" to name. Modify test program to assign course to Faculty objects. Write a test program to create two Students and two Faculties, assign (NOT read from console) the following information, and invokes their printInfo methods, xxxx is your Kean ID. A Student object name: unknown, age: - 1, email: none A Student object name: "demo_s2", age. 23, email: xyz@gmail.com A Faculty object name: "dcmo_f1", salary: 0. dept: none, course: none A Faculty object name, "demo_f2", salary: -10000, dept: "CS", course: CPS223l Program6 is developed by . This project should be coded in One java file

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!