A constructor that is supplied a string


Payroll Program, Working with Array and Classes

This third programming project is intended to demonstrate your knowledge of the following: 

create and implement a simple class 
properly use static variables, methods and constants 
use arrays to efficiently organize data 
use the this keyword (not required here; may be incorporated appropriately for bonus points; often used in searching a database)
The third programming project involves reading in payroll data for a series of employees and computing the gross pay for each employee for the week. The program should consist of two classes. The first class EmployeePayroll represents payroll data for one employee for one week. It should contain the following data:

class constants for the weekend multiplier factors 
a class variable that maintains the number of employee objects created 
an instance double precision floating point variable containing the employee's hourly pay rate 
an instance integer array of hours worked for each day of the week for one employee 
This class should contain the following methods:

a constructor that is supplied a string that contains one line of employee payroll data--the pay rate followed by the hours worked for seven days 
an instance method called computeGrossPay that returns the gross pay for that employee 
a toString method that returns a string representation of the object 
a class method employeeCount that returns the total number of employees 
Saturday hours are paid at time and a half and Sunday hours at double time.

The second class should contain the main method. It should repeatedly prompt the user for payroll data, which should be entered on a single line for each employee. It should create an employee object using the constructor, display the object with toString and display the gross pay for that employee.

After all employees have been processed, the employeeCount method should be called to display the total number of employees. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A constructor that is supplied a string
Reference No:- TGS0107503

Expected delivery within 24 Hours