Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The assignment involves writing three classes, plus a test class. All four class

ID: 3552362 • Letter: T

Question

The assignment involves writing three classes, plus a test class. All four classes are in the same project. The base class is a Person class which contains a couple of attributes and methods common to all persons. The first derived class is an Employee class which adds employee information to a Person. The second derived class is a GroupManager class which adds work group information to an Employee. The test program will be structured to include a method which accepts a base class reference and demonstrates polymorphic behavior.


NOTE: None of the first three classes below do ANY user input or console output! Console output is only done in the display method of the test program!

NOTE: ALL the member variables of these classes MUST BE PRIVATE!

NOTE: Only the main method in the test class and the display method in the test class can be static methods.

Development Strategy: Start with the Person class. Implement that first. Then write some test code in your test program to check that it works. Then go on to the Employee class. When that is written add test code for that. Finally implement the GroupManager class and then add test code for that.

The details of the three classes to be implemented are as follows:

1.     The Person class contains the name and address of a person. An explicit value constructor must be provided to set both of these values. There is a changeName and a changeAddress method used to modify the name or the address value. There must be ONE getInfo method that returns one string containing both the name and address. The string returned should be formatted to appear as shown below:

             Name: Davy Jones

             Address: New York

Private Member Variables:

            name, address

Public Methods:

            one constructor

Explanation / Answer

( Following all the Specifications )

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote