answer.
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]
2 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]2 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
The Maybe Pay Life Insurance Co. is trying to sell you an investment policy that will pay you and your heirs $31,000 per year fo
Whitepunk [10]

Answer: 6.51%

Explanation:

To get the interest rate at which the deal will be fair

Annual payment per year/ cost × 100

Perpetuity = D/r

476000 = 31000/r

r = 31000÷ 476000

r = 0.06512

r = 0.06512 × 100

r = 6.512%

Where D is the dividend

r is the rate

3 0
2 years ago
Carlos wants Juan and Rita to handle the personality issues themselves. As the company did not make any thought-out change in an
jeka94

Answer:

The correct answer is letter "D": strategy.

Explanation:

Organizations must come up with different strategies at the moment of starting their operations. Every entity needs to create contingency plans to use them as tools in front of adverse situations. Otherwise, when problems come, enterprises will not know what to do to mitigate the impact of those issues.

Therefore,<em> the lack of thought-out anticipation change forces the company where Carlos, Juan, and Rita work to make a strategy change.</em>

7 0
2 years ago
Freight Terms Determine the amount to be paid in full settlement of each of two invoices, (a) and (b), assuming that credit for
frozen [14]

Answer:

A

Explanation:

3 0
2 years ago
Read 2 more answers
Pete has started an electronics firm with the potential for high growth. he obtains funding for the business from a group of inv
TiliK225 [7]
The type of financing that Pete has secured is VENTURE CAPITAL. Venture capital is a type of private equity, a form of financing that provides funds by private investors to new companies with high potentials or emerging companies that are deemed to have high potentials. In return for the money provided by the private investors, they become part owners in the company.
7 0
2 years ago
Your automatic payment option pays bills of $23.17, $55.67, $2,345.15, $575.25 and $1.15. How much was the mean payment?
ollegr [7]

Answer:

$600.078

Explanation:

the mean is also the average which is the total sum divide by 5

0 0
2 years ago
Other questions:
  • Which statement best describes the ideal of loyalty to one's supervisor
    14·1 answer
  • Imagine that you are looking for a job as a interior decorator. Describe four specific ways that you could look for job leads
    14·2 answers
  • Which of the following is true while making a capital investment decision?
    8·1 answer
  • Regardless of the criteria differences among different types of projects, the most important criterion for project selection isH
    9·1 answer
  • Suppose General Motors charges its Mexican subsidiary $1 million for auto assembly equipment that could be purchased on the open
    9·2 answers
  • The staff training center at a large regional hospital provides training sessions in CPR to all employees. Assume that the capac
    6·2 answers
  • Much fanfare was made about anthony's latest bonus in the office. he has always been a high performer. however, this year he rec
    13·1 answer
  • Saxton Corporation purchased 25 percent of Taylor Company's voting stock on January 1, 2013, for $18 million in cash. At the dat
    5·1 answer
  • Norma is considering buying a certificate of deposit with the $500 she has in a regular savings account. Explain to her what fac
    13·1 answer
  • Adrian's Premium Boxing Service subcontracts with a chocolate manufacturer to box premium chocolates for their mail order catalo
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!