Calculate Pay Program 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...

1 answer below »
Please see attachment


Calculate Pay Program 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  Download Pay Calculationtable. 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 Take a screen shot of the results page and save the image. When you are finished with your Java program, zip the file(s). Next, submit the zip folder that contains the running source code to the
Answered 14 days AfterJan 30, 2022

Answer To: Calculate Pay Program For this assignment, you will take on the role of software developer as part...

Manikandan answered on Feb 01 2022
116 Votes
Calculate Pay Program:
           This program is implemented by Java. Which will be using Object Oriented Programming concepts. Like Object, Class, Encapsulation, Abstraction. These concepts are implemented in this program.
           Other than these concepts some more are there Like Inheritance, Polymorphism.
Object:
           A real-world entity is called an Object. An object will ha
ve State and behaviour. In programming, the state is nothing, but properties and behaviour is nothing but methods. 
           This can be defined as an instance of a class. So, each object will be having an address and it required memory to store the object. If you want to access any class in java then we need to create an object first.
           Example:
                       A mobile phone is an object. And its states are ram, us, display, processor, camera, etc. And its behaviours are you can call, chat, take photos, watching videos.
           In the Calculate Pay Program “CalculationDisplay.java” is a real-world entity. Which will be having States are input and output properties, behaviours are getting those properties values. 
Class:
A Class in java will be called a template or blueprint from this you can create the object. A class can contain objects. This will have variables and methods.
Syntax:
Class {
}  
           In this program, I have created many classes like CalculatePay.java, CalculationDisplay.java, CalculationService.java, GetFromFile.java, etc.
Encapsulation:
           This is nothing but wrapping up data and code together into a single unit. 
The normal java class is an example of this. A class will be wrapping data(properties) and code (Methods). Java Bean class is called a fully encapsulated class.
Here data would be private using public members we can access the data.
In This program, I have created a class name called “CalculationDisplay.java” which is a bean class. And this is an example of Encapsulation.
Abstractions:
           This is nothing but hiding the internal implementation of a process. Just using that functionality. Here you don't need to know how they implemented that functionality just uses it. In java, we can achieve abstraction 2 ways as follows
1. Using Abstract class – Partially abstracted. (Method declaration and definition will be there)
2. Using Interfaces – Fully abstracted (Only Method declaration)
Both should be implemented by other concrete classes. We cannot create an object for those.
In This program, I have used an interface for creating some constants. “PayValues.java”.
Source Code:
1) CalculatePay.java
package com.pay.app;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;
import com.pay.app.bean.CalculationDisplay;
import com.pay.app.service.CalculationService;
import com.pay.app.util.GetFromFile;
/**
*
* @author Mel Weaver
* @CourseName CPT 307 Data Structures & Algorithms (INE2206A)
* @InstructorName Michael Hayden
* @DateSubmited February 8, 2022
*/
public class CalculatePay {
    static CalculationService service = new CalculationService();
    
    
    //Need to run this main method to execute this application
    public static void main(String[] args) {
        System.out.println("--------------Welcome to calculate pay application----------");
        GetFromFile getFromFile = new GetFromFile();
        CalculationDisplay display = new CalculationDisplay();
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {
            while(true) {
                System.out.println("You can give input in following ways:");
                System.out.println("1 -> Enter Manually");
                System.out.println("2 -> Read from file");
                System.out.println("3 -> Exit");
                String inputData = reader.readLine();
                if("1".equals(inputData)) {
                    System.out.println("Please enter employee name:");
                    display = new...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here