Sale!

CSC300 Assignment 2 Warm-up Programming Assignment

$30.00 $18.00

Original Work ?

Download Details:

  • Name: AssignmentTwo-hdj6ys.zip
  • Type: zip
  • Size: 180.00 KB

Category: Tags: , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Write a Payroll class and name it Payroll.java. This class should use the following three arrays as fields:

– employedId:
| 5658845 | 4520125 | 7895122 | 8777541 | 8451277 | 1302850 | 7580489 |

– hours: hold the number of hours worked by each employee
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |

– payRate: hold each employee’s hourly pay rate
| 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |

The class should relate the data in each array through the subscripts. For example, the number in element 0 of the hours array should be the number of hours worked by the employee whose identification number is stored in element 0 of the employedId array. That same employee’s pay rate should be stored in element 0 of the payRate array.

In addition to writing the appropriate accessor and mutator methods, the class should have a method that accepts an employee’s identification number as an argument and returns the gross pay for that employee. The number of employee should be a public constant class member.

The class will be tested and driven using different drivers; therefore, write the code exactly as the requirements outlined. In the comments section of your java file, write the Big-O time analysis of your methods.

Notes:
1. The program must compile without syntax errors; 50% of the assignment points will be deducted if your program does not compile, even if your program is “essentially” correct.

2. To get full credit for an assignment, your program must solve the assignment problem completely.

3. Please add comments to the source code. Your program should have a reasonable amount of comments.

4. At the very beginning of each file, there should be a block comment containing the student name, course number, and assignment number.

5. Follow the programming styles and guidelines discussed in class, such as using meaningful names for variables and camel case conventions for variables, classes, etc.

6. Using ChatGPT or any LLM is not allowed. Your code will be examined if written using an AI tool.