Question: Create a java project and name it FinalExam_Q2: (0.25 for each error in the code) 1- Create an abstract class 'People (1m) 2- Add three

 Create a java project and name it "FinalExam_Q2": (0.25 for each

Create a java project and name it "FinalExam_Q2": (0.25 for each error in the code) 1- Create an abstract class 'People (1m) 2- Add three attributes to the People class: Id, name and mobile. (1m) 3- Add two abstract methods to the class: Attend' and 'register' (2m) 4- Add non-abstract method display that print the id, name and mobile on one line. (1m) 5. Create a class 'Student' with a method 'Attend' which prints "Student present" and method "register" which return credit * cost (2m). 6- create a class "teacher with a method 'Attend' which prints "Teacher Arrive" and method register which return hours * rate. (2m) 7. Add "credit" and "cost" attributes the Student class and "hours & rate attributes to the teacher class. (0.5m) 8- Overload the constructor in the teacher Class. (1m) 9. Both class inherit form the class people. (1ml) 10- Override the display ( method in both classes to print the extra information. (1m) 11- In the main program Create two objects: one for student and one for teacher. (1m) b. Call their respective methods. (1m) 12- Test your program (0.5m) a

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!