Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Inheritance Using super in the constructor Using super in the method Method overriding Write an application with four classes Employee, Secretary, Engineer, and Tester class

Inheritance

Using super in the constructor

Using super in the method

Method overriding

Write an application with four classes Employee, Secretary, Engineer, and Tester class with main method in it.

The following characteristics should be used: empID, firstName, lastName, phone, salary, typingSpeed, engineerType.

Characteristics that are applicable to all employees should be instance variables in the Employee class. The others should be in the class(s) where they belong.

Class Employee should have constructor that initializes all its data. Classes Secretary, and Engineer will have constructors which will reuse their parents constructor and provide additional code for initializing their specific data.

Class Employee should have toString method that returns string representtion of all employee data. Classes Secretary, and Engineer will override inherited toString method from class Employee in order to provide appropriate string representation of all data for their classes (which includes inherited data from Employee class and their own data).

Class Tester will instantiate 1-2 objects from those three classes (at least five total) and it will display the information about those objects by invoking their toString methods.

Submit java files with code for all four classes, picture of program run from BlueJ, and picture of UML diagram.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions