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
Daniel derives utility from only two goods, cake (Qc) and donuts (Qd). The marginal utility that Daniel receives from cake (MUc)
Agata [3.3K]

Answer:

240= 3Qc + 3Qd  

Explanation:

The computation of the Daniel's budget constraint is shown below;

Given that

Daniel's income= $240

Price of cake (Pc) =$3

Price of donuts (Pd) =$3

So spending on cake = 3Qc

And,

Spending on donut= 3Qd

Finally

Total spending = 3Qc + 3Qd

Now the equation of budget constraint is

Income= (quantity of cake)(price of cake) + ( quantity of donut)(price of donut)

So,  

Income= Qc Pc+ Qd Pd

240= 3Qc + 3Qd  

4 0
2 years ago
Which of the following should employers do to actively prevent workplace hazards? A. Completely eliminate all possible hazards.
wlad13 [49]
Your answer is D hope this helps
4 0
3 years ago
Read 2 more answers
The morgan company, a small furniture manufacturer, divides its organization into marketing, human resources, accounting, and pr
Leona [35]
<span>The morgan company, a small furniture manufacturer, divides its organization into marketing, human resources, accounting, and production departments. this is an example of departmentalization by function


</span>
3 0
3 years ago
Sheridan Company’s standard labor cost per unit of output is $33.00 (3.00 hours x $11.00 per hour). During August, the company i
seraphim [82]

Answer:

Total variation= $363 favorable

Explanation:

Giving the following information:

Sheridan Company’s standard labor cost per unit of output is $33.00 (3.00 hours x $11.00 per hour). During August, the company incurs 2,970 hours of direct labor at an hourly cost of $12.10 per hour in making 1,100 units of finished product.

Direct labor efficiency variance= (SQ - AQ)*standard rate

Direct labor efficiency variance= (3,300 - 2,970)*11= 3,630 favorable

Direct labor rate variance= (Standard Rate - Actual Rate)*Actual Quantity

Direct labor rate variance= (11 - 12.1)*2,970= 3,267 unfavorable

Total variation= 363 favorable

3 0
3 years ago
That a person can buy a product or service in.
valentina_108 [34]

Answer:

The smallest chunk

Explanation:

Got it right and good luck kid

6 0
2 years ago
Other questions:
  • George is considering an investment that will pay $3,250 a year for eight years, starting one year from today. What is the maxim
    7·1 answer
  • Ellie's Deli offers good sandwiches and fast service to its lunchtime customers from a nearby university. It also delivers the s
    12·1 answer
  • Select the correct statement regarding managerial and financial accounting. Multiple Choice Timeliness is more important in fina
    13·2 answers
  • Let's say we could teach a dolphin to understand the difference between the sentences "the parrot kissed the dolphin" and "the d
    13·1 answer
  • Majesty Productions accepted a $7,200, 120-day, 6% note from Swartz Studio on March 1. On the date the note matures, Swartz is u
    14·2 answers
  • The following requirements are interdependent. For example, the $252,000 desired profit introduced in Requirement c also applies
    7·1 answer
  • The optimum approach for escalation is based on a thorough integration of the monitoring process into the
    10·1 answer
  • Consider a process consisting of three resources. Assume there exists unlimited demand for the product, and that all activities
    14·1 answer
  • Kelly Slater owns a parcel of land in Palm Springs and is considering two possible development options which both use his signat
    9·1 answer
  • the program protection plan (PPP) is the milestone acquisition document that describes the plan, responsibilities, and decisions
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!