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]
3 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]3 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
How can the outsourcing of jobs cause production possibilities to expand?
ollegr [7]
Outsourcing of jobs causes product possibilities to expand as they carry out their work or company into having it outside rather than indoor or at home in a way of expanding their functions and their company to be able to make their company known and tackle different circumstances or dimensions that will greatly affect their company.
3 0
3 years ago
Read 2 more answers
Which overall message does this political cartoon convey? advertising on buses will raise money for schools. advertising on buse
Gennadij [26K]

The political cartoon referred to was by Jeff Parker, has been an editorial cartoonist for Florida Today since 1992. The overall message being conveyed by the referenced political cartoon is that advertising on school buses could have a negative affect on children.

Certain states in the U.S (e.g. New Jersey, Texas, Massachusetts among others) permit school districts to sell ad space on school buses in order to raise funds for school activities. Some have <span>argued that these ads unfairly target young, impressionable consumers, and as such should be stopped.</span>

7 0
3 years ago
Read 2 more answers
On December 31, Briar Co. disposed of a piece of equipment that cost $6,000 with accumulated depreciation as of December 31 of $
Setler [38]

Briar Co. disposed of a $6,000 piece of equipment on December 31 with $4,500 in accrued depreciation as of that date. Then $1,500 will be debited from the Loss on Equipment Disposal account.

<h3>What is loss on Equipment Disposal account?</h3>

Gain/Loss on Asset Disposal is a common account name of the Equipment Disposal account.

The net difference between the initial asset cost and any cumulative depreciation (if any) is debited to the disposal account, while the balances in the fixed asset account and the accumulated depreciation are reversed.

On December 31, the debited amount is calculated as:

=\text{Disposed Equipment- Accumulated Depreciation}\\\\ =\$6,000- \$4,500\\\\ =\$1,500

Therefore, $1,500 will be the amount of loss on disposal of the Equipment.

Learn more about the depreciation, refer to:

brainly.com/question/14682335

#SPJ1

7 0
2 years ago
What are signs of someone being in your account on Xbox? like linked accounts or whatever.
horrorfan [7]

Answer:

if you randomly get payments on your xbox that u didn't pay for like games

4 0
3 years ago
Read 2 more answers
A market research company employs a large number of typists to enter data into a computer database. The time it takes for potent
monitta

Answer:

<u><em></em></u>

  • <u><em>4.75% of the candidates takes more than two hours to learn the computer system.</em></u>

<u><em></em></u>

Explanation:

The relevant information to solve the problem is:

  • 1. <em>The time it takes to learn follows a Normal distribution </em>

  • 2.<em> The mean is 90 minutes</em>

  • 3. T<em>he standard deviation is 18 minutes</em>

  • 4. <em>The question is What proportion of candidates takes more than two hours to learn the computer system?</em>

Then, you shall calculate the Z-score and use a standard distribution table to look up the Z-score and the corresponding probability.

Repeating myself from a recent answer, "there are two types of standard distribution tables: tables that show values that represent the AREA to the LEFT of the Z-score, and tables that show values that represent the AREA to the RIGHT of the Z-score".

<u>1. First, calculate the Z-score:</u>

       Z-score=\frac{x-mean}{standard\text{ }deviation}

                          x=2hours=120min

        Z-score=\frac{120-90}{18}\approx 1.67

<u>2. Use the table that represents the area to the right of the mean to find the ratio of typists that have a Z-score greater than 1.67.</u>

          Probability=0.0475=4.75\%

Therefore, 4.75% of the candidates takes more than two hours to learn the computer system.

4 0
3 years ago
Other questions:
  • According to Modigliani and Miller (MM), in a world with corporate income taxes, the optimal capital structure calls for approxi
    9·1 answer
  • Bart is a lawyer and an employee of Alway, Inc. Bart is representing Alway in its purchase of Steel Co. Bart learns from Alway's
    14·1 answer
  • Mountaintop Sports Inc. issued $200,000 of 10-year, 6% bonds, with interest payable semiannually on June 30 and December 31 each
    14·1 answer
  • What was Henry Ford's output
    11·1 answer
  • Garfield Corp. expects to sell 1,300 units of its pet beds in March and 900 units in April. Each unit sells for $110. Garfield’s
    11·1 answer
  • Allyson Ashley makes jet skis. During the year, Allyson manufactured 90,000 jet skis. Finished goods inventory had the following
    7·1 answer
  • Cadets at West Point spend time during the summer learning about the branches of the Army like aviation, infantry, ordnance, fin
    11·1 answer
  • Nepal is secular country​
    13·1 answer
  • Waddell Company had the following balances in its accounting records as of December 31, 2018
    9·1 answer
  • contains funds you have in your bank checking account as travelers' checks and the currency in circulation in the economy.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!