
i. Define a class called Student and its two subclasses named underGraduateStudent and postGraduateStudent. Make a subclass of Employee. A person has a name, address, phone number, and email address. A underGraduateStudent has a class status (freshman, sophomore, junior, or senior) while a postGraduateStudent has status(masters, doctorate). Define the status as a constant. Define a method called toString which overridden in each class to display the students name. Write a test program that creates a undergraduate Student and postGraduate and invokes their toString methods.
ii. Define a super class worker. Declare at least three variables and at least two methods. Define another class contractWorker which is a subclass of class employee. Instantiate an object of class contractWorker and show how this object inherits behavior defined in superclass worker.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.