Question: Create a class Person that contains fields for first name last name social security number (Form ddd-dd-dddd; example 000-00-0000) birth date You must make this

Create a class Person that contains fields for first name last name social security number (Form ddd-dd-dddd; example 000-00-0000) birth date You must make this field Dat type. street address city state postal code country Create appropriate accessor and mutator methods to return and modify the private data. Error check the social security number. It must follow the pattern 3 digits, dash, 2 digits, dash, 4 digits Hint: Create a private boolean method to check if a character is a digit. Invoke this method within a while statement that extracts one charcater at a time from the social security number. Include toString method. Include default constructor for the Person class that automatically sets the all the fields to default values. Include a method that will implement the compareTo method from the Comparable interface based on the social security number. Hints To make the birth date a Dat type, the Dat class must be in the same directory and the Person class. Make a copy of the Dat class from the class web site. Save it with the name Dat.java. Creating an instance variable of another class is new to you. Here are some guidelines. The variable is declared in the same place as the other instance variable. However, it is not instantiated. Example, private Dat birthDate; The birth date variable is instantiated in the birth date mutator method. Strings have a compareTo method. Therefore the body of the compareTo method for the Person class should use the compareTo method from the String class. Create a testing program to test the all methods of the Person class. Save the testing program in the same directory as the Person class. Compile, execute, and test the testing program to be certain the Person class is correct. Turn in Person class testing program art 1Create an abstract class called Employee that is derived from the Person class. (Project 04). This class must have the following private data employee e-mail address employee telephone number This class must have the following methods constructors Create appropriate accessor and mutator methods to return and modify the private data. toString an abstract method called payCheck that returns the amount of pay for the pay period Part 2 Create a class called Management that is derived from Employee This class must have the following private data salary bonus This class must have the following methods constructors Create appropriate accessor and mutator methods to return and modify the private data. toString payCheck Management pay is salary + bonus Part 3 Create a class called Sales that is derived from Employee This class must have the following private data sales base pay This class must have the following methods constructors Create appropriate accessor and mutator methods to return and modify the private data. toString payCheck Sales pay is base pay + commission sales under $30,000 --- commission rate 1% sales between $30,000 and $50,000 --- commission rate 1.5% sales over $50,000 --- commission rate 4% Part 4 Create a class called Hourly that is derived from Employee This class must have the following private data hours wage rate This class must have the following methods constructors Create appropriate accessor and mutator methods to return and modify the private data. toString payCheck hours over 40 get time and a half Part 5 Create a class called Payroll. This class must have the following private data an ArrayList of Employees This class must have the following methods constructors addEmployee getEmployee removeEmployee toString (prints the payroll for the company) totalPayroll (finds the total amount of money paid to employees) Hints Create a new directory for Project05. Save a copy of your Person class in the Project05 directory. Save a copy of the Dat class in the Project05 directory. Create a testing program to test the all methods. Compile, execute, and test the testing program to be certain all methods work correctly. Turn in Employee class Management class Sales class Hourly class Payroll class testing program java language please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!