1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ss7ja [257]
4 years ago
14

. Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shi

ft, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; any hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third-shift workers can elect to participate in the retirement plan for which 3% of the worker’s gross pay is deducted from the paychecks. Write a program that prompts the user for hours worked and shift, and, if the shift is 2 or 3, whether the worker elects the retirement. Display: (1) the hours worked, (2) the shift, (3) the hourly pay rate, (4) the regular pay, (5) overtime pay, (6) the total of regular and overtime pay, and (7) the retirement deduction, if any, and (8) the net pay. Save the file as AcmePay.java.
Business
1 answer:
attashe74 [19]4 years ago
5 0

Answer:

Program file

filename: AcmePay.java

import java.util.Scanner;

public class Payroll {

public static void main(String[] args) {

double[] shiftPay = { 17, 18.50, 22 };

double hourlyPayRate = 0, regularPay = 0, overTimeHours = 0, overTimePay = 0, retirementDeduction = 0,

netPay = 0;

System.out.println("*** Employee Pay ***");

// scanner object to read data

Scanner scan = new Scanner(System.in);

// read the number of hours worked from user

System.out.print("Enter the number of hours worked: ");

double numHours = scan.nextDouble();

// read the shift

System.out.print("Enter the shift (1 - 3): ");

int shift = scan.nextInt();

hourlyPayRate = shiftPay[shift];

// calculate regulaPay

regularPay = numHours * hourlyPayRate;

if (numHours > 40) {

overTimeHours = numHours - 40;

overTimePay = overTimeHours * (hourlyPayRate * 1.5);

}

// calculate grossPay

double grossPay = regularPay + overTimePay;

// check for availability of retirement plan

if (shift == 2 || shift == 3) {

System.out.print("Did the worker elected for retirement (1 for yes, 2 for no): ");

int chooseRetirement = scan.nextInt();

if (chooseRetirement == 1) {

// calculate retirement bonus

retirementDeduction = (grossPay * 0.03);

}

}

// calculate netPay

netPay = grossPay - retirementDeduction;

// print the information to stdout

System.out.println("Hours worked: " + numHours);

System.out.println("Shift: " + shift);

System.out.println("Hourly Pay rate: " + hourlyPayRate);

System.out.println("Regular Pay: " + regularPay);

System.out.println("Overtime hours: " + overTimeHours);

System.out.println("Overtime pay: " + overTimePay);

System.out.println("Total of regular and overtime pay (Gross pay): " + grossPay);

System.out.println("Retirement deduction, if any: " + retirementDeduction);

System.out.println("Net pay: " + netPay);

// close scanner object

scan.close();

}

}

Explanation:

You might be interested in
1. What is the difference between wages and salaries?
soldier1979 [14.2K]

The difference between salaries and wages is that a salary is a fixed amount of money per pay period and a wage is money earned by the hour.

8 0
3 years ago
The following information is provided by the Town of York's General Fund operating statement and budgetary accounts for the fisc
Stels [109]

Answer

The answer and procedures of the exercise are attached in the following image.  

Explanation  

Please consider the data provided by the exercise. If you have any question please write me back. All the exercises are solved in a single sheet with the formulas indications.  

8 0
3 years ago
There are many account representatives who can help you with your order is an example of a cliche.
kenny6666 [7]

The statement"There are many account representatives who can help you with your order is an example of a cliche." is FALSE.  This is further explained below.

<h3>What are account representatives?</h3>

Generally, A professional who typically works on teams that are responsible for providing customer support and creating relationships is known as an Account Representative. They bring in revenue through establishing new customer connections and fostering those that are already in existence. They collaborate with clients on an as-needed basis throughout each step of the development process.

In conclusion, The convenience factor is one of the many benefits that listeners may get from podcasting as a form of advertising.

Read more about account representatives

brainly.com/question/27098701

#SPJ1

6 0
2 years ago
You purchased a bond at a price of $1,700. In 20 years when the bond matures, the bond will be worth $10,000. It is exactly 13 y
Mars2501 [29]

Answer:

<u>Annual rate of return which will be earned from today is 5.89%</u>

Explanation:

FV = PV (1+r)^n

r is int Rate per anum abd n is balance period

10000 = 6700 ( 1 + r)^n

10000 = 6700 ( 1 + r)^7

( 1 + r)^7 = 10000 / 6700

= 1.4925

1+r = 1.4925^(1/7)

= 1.0589

r = 1.0589- 1

= 0.0589 i.e 5.89%

6 0
3 years ago
Training is a skill learning process.​
Trava [24]

Explanation:

Training is an activity leading to skilled behavior, the process of teaching employees the basic skills they need to perform their jobs. ... So, Training is a social and continuous process of increasing skills, knowledge, attitudes and efficiency of employees for getting better performance in the organization.

7 0
3 years ago
Other questions:
  • When authority is concentrated at the top level of management, the organization is said to be decentralized.
    15·1 answer
  • Which of the following focuses on verifying compliance with stated securityobjectives, requirements, regulations, and contractua
    8·1 answer
  • he following information relates to Jay Co.'s accounts receivable for 2004: Accounts receivable, 1/1/04 $650,000 Credit sales fo
    13·1 answer
  • Araceli is a team member in a large corporation. She never speaks in team meetings because she has seen members talk behind each
    7·1 answer
  • Bryan gave the manager of his convenience store a set of binoculars so she could see the gasoline prices charged by the other co
    7·1 answer
  • Explain the difference between implicit and explicit costs
    11·1 answer
  • Which of the following, if true, would illustrate why price indexes such as the CSPI might overstate inflation in the cost of go
    6·1 answer
  • Ryan is going to rent a truck for one day. There are two companies he can choose from, and they have the following prices. Compa
    13·1 answer
  • I tryed and faled at this..............................................................
    5·2 answers
  • Splendid Occasions received $2,970 for services to be performed for the next 8 months on March 31 and recorded this transaction
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!