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
Tuscany Company estimated the following costs at the beginning of a particular year: Overhead $5,340,000 Direct labor cost $890,
solmaris [256]

Answer: $300,000

Explanation:

As overhead is applied on the basis of direct labor cost, the overhead rate for the period is:

= Overhead / Direct labor cost * 100%

= 5,340,000 / 890,000 * 100%

= 600%

If direct labor cost is $50,000 then overhead applied will be:

= Direct labor cost * Overhead rate

= 50,000 * 600%

= $300,000

7 0
3 years ago
Galena is a new agent for a financial services company. She decides to join the local chamber of commerce, the local association
Angelina_Jolie [31]
The answer is networking, if there’s more to it then it’s networking to generate leads.
8 0
3 years ago
According to the text, thinking about your "academic anatomy" preference is a way to:
Mila [183]
Here is the answer that best completes the statement above. According to the given text, when you are thinking about your "academic anatomy", this preference is a way to get a handle on what you feel satisfying and fulfilling. Hope this helps.
3 0
3 years ago
The idea that firms and resource suppliers in seeking to further their own self-interests in a competitive market economy also s
Lorico [155]
That is known as the "invisible hand"
4 0
3 years ago
Read 2 more answers
Nash's Trading Post, LLC had an increase in inventory of $88800. The cost of goods sold was $414400. There was a $22200 decrease
makkiz [27]

Answer: $525,400

Explanation:

From the question, we are informed that Nash's Trading Post, LLC had an increase in inventory of $88800, the cost of goods sold was $414400 and that there was a $22200 decrease in accounts payable from the prior period.

Using the direct method of reporting cash flows from operating activities, Nash's's cash payments to the suppliers will be:

= $88,800 + $414400 + $22200

= $525,400

4 0
3 years ago
Other questions:
  • What should be the maximum spending if your gross income 2,400 per month
    9·1 answer
  • You work as a cashier for a bookstore and earn $6 per hour. you also baby sit and earn $6 per hour. you want to earn at least $6
    10·1 answer
  • At one time, AT&T and T-Mobile wanted to merge but were prevented from doing so by the Justice Department. The government ma
    8·1 answer
  • Match the different types of incomes to their sources.
    5·2 answers
  • The depreciation of equipment will require an adjustment that results in A. total assets increasing and total expenses increasin
    12·2 answers
  • Inventory records for Dunbar Incorporated revealed the following: Date Transaction Number of Units Unit Cost Apr. 1 Beginning in
    14·1 answer
  • When your bank or credit card company sends you a notification of changes in how it collects or shares data, it is sending that
    12·1 answer
  • Company ABC provides a dependent care assistance flexible spending arrangement to its employees through a cafeteria plan. In add
    11·1 answer
  • The size and cut of a diamond allows people looking at a ring to roughly estimate its cost and make a judgment about the wearer'
    12·1 answer
  • A product-process matrix can be used to address the fact that customers often participate in service processes.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!