Computer Science Homework Help

CPT 307 Ashford University CH1 Data Structures and Algorithms Home Project

 

Calculate Pay Program

Prior to beginning work on this assignment, review Chapter 1 in Data Structures Essentials and the 4 Major Principles of Object-Oriented Programming (Links to an external site.) article. Then access the required websites for Java syntax, the Lesson: Object-Oriented Programming Concepts (Links to an external site.) tutorial, and Java OOPs Concepts (Links to an external site.) from the JavaTpoint website.

Students: Be sure to download and save a PDF version of your textbook for future reference. It will be used in later courses within your program, including the final, capstone course. Zybooks limits online access to your course textbooks to a 12-month period. (Zybook Download Instructions download)

For this assignment, you will take on the role of software developer as part of a team of developers for a retail company. The payroll manager of the company has tasked you with developing a Java program to quickly calculate an employee’s weekly gross and net pay. The program must prompt the user to enter the employee’s name, rate of pay, and hours worked. The output will display the information entered into the program along with the calculations for gross pay, total amount of deductions, and net pay.

In this coding assignment, you will utilize the Java syntax and techniques you learned while reviewing the required resources for Week 1. You may select appropriate variable names as long as proper Java syntax is used. You will also submit your source code.

Input:
In the input section, utilize Java syntax and techniques to input the employee’s name, rate of pay, and hours worked. The input should be completed either via keyboard or via file. As a last resort, the data can be hard-coded into the program.

The input for this calculation is in the Pay Calculation downloadtable.

Processing:
In the processing section, the following calculations will need to be performed in the processing section:

  • Gross Pay:
    Gross pay if hours worked are 40 hours or less = hours worked * rate of pay
    Gross pay if hours worked are greater than 40 hours = ((hours worked – 40) * (rate of pay * 1.5)) + (40 * rate of pay)

    • Example – Employee worked 55 hours. The employee’s rate of pay is $10.00.
      ((55 – 40) * (10 * 1.5)) + (40 * 10) = 625
      The gross pay is $625.
  • Deductions:
    Deductions are calculated based upon the following rates:

    • Federal Tax = 15%
    • State Tax = 3.07%
    • Medicare = 1.45%
    • Social Security = 6.2%
    • Unemployment Insurance = .07%

The following calculations are used to calculate each deduction:

  • Federal tax amount = federal tax rate* gross pay
  • State Tax amount = state tax rate * gross pay
  • Medicare amount = Medicare rate * gross pay
  • Social Security amount = social security rate * gross pay
  • Unemployment Insurance amount = unemployment insurance amount * gross pay

Total deductions = Federal Tax amount + State Tax amount + Medicare amount + Social Security amount + Unemployment Insurance amount

  • Net Pay:
    The net pay amount is calculated as follows:
    Net pay = gross pay amount – total deductions

Output:
The Java program should display the following information:

  • Employee Name
  • Rate of Pay
  • Hours Worked
  • Overtime Worked
  • Gross Pay
  • Total amount of deductions
  • Net Pay

Your code must include the following as comments:

  • Name of program
  • Author/student’s name
  • Course name and number
  • Instructor’s name
  • Date submitted