Question: program to do the following.... the class. Create superclass UTAPerson with String name and String ID. This class has an instance method WhoAmI ( )



program to do the following.... the class. Create superclass UTAPerson with String name and String ID. This class has an instance method WhoAmI ( ) that prints "I am xxxxx" where xxxxx is the name of Using UTAPerson, create subclass Student and subclass Employee. In main ( ) , instantiate a Student object and an Employee object and store them in the same ArrayList. Loop over the ArrayList and call WhoAmI () for each element. The output should be I am Student I am Employee Use these lines of code to form your answer. Add { } as needed and format as needed to follow the code formatting standard of this class. Use Preformatted font or lose 5 points. public class Student implements UTAPerson super (name ) ; ABC . add ( Student ( "Student") ) ; name = className ; private void WhoAmI( ) super ( ) ; public UTAPerson ( String className) ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
