Question: C- ( . . Write a JAVA code to implement the following: 1. Create a super class named Human, that has the following members: a
C- ( . . Write a JAVA code to implement the following: 1. Create a super class named Human, that has the following members: a private String attribute name constructor to initialize the attribute name. set method to change the values of name. get method to return the values of name. override method toString to print the value of name. 2. Create a sub class named Employee that, inherits from superclass Human has a private attribute ID constructor to initialize the attributes name (via superclass constructor) and ID. 3. Write a Test class that has the main method: (0. . Declare a reference e of Employee class Create an object of Employee class (with name Ahmed and 123 IL and assign it to the e reference ( Call toString method to print the name and ID ( 25 point) TT T Arial 3 (12pt) TE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
