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
The web organizes information by using _____, meaning documents that include embedded references to audio, text, images, video,
Whitepunk [10]

The web organizes information by using hypermedia, meaning documents that include embedded references to audio, text, images, video, or other documents.The term hypermedia comes from the tem hypertext, which is text displayed on a computer display . Hypermedia is more than a text It is everything that we see, hear, and interact with on the Web (data, text, graphics, video, and audio).

3 0
3 years ago
How much can Azco Autosystems, Inc., afford to spend on an energy management system if the software will save the company $21,30
ivann1987 [24]

The amount that that  Azco Autosystems, Inc.,  can afford to spend on an energy management system is $80,744.

<h3>Present value</h3>

Using this formula

Present Value = A(P/A, 10%, 5)

Where:

A=$21,300

(P/A, 10%, 5)=3.79079

Let plug in the formula

Present Value = 21,300 (P/A, 10%,5)

Present Value = 21,300 (3.79079)

Present Value =80,743.8

Present Value = $80,744 (Approximately)

Inconclusion the amount that that  Azco Autosystems, Inc.,  can afford to spend on an energy management system is $80,744.

Learn more about present value here:brainly.com/question/15904086

4 0
2 years ago
One of Justin's largest international customers is Alpine Airwaves in Switzerland. He got a call from his contact at Alpine Airw
Evgen [1.6K]

Answer:

Justin's company should prepare to demonstrate that it is ISO 14001 compliant.

This means that it is following the environmental management standards for environmental footprint and waste reduction, while promoting environmental sustainability in its operations.

Explanation:

ISO 14001 is one of the environmental management standards, prescribed by the International Organization for Standardization (ISO), "to help reduce environmental impacts, reduce waste, and make the environment more sustainable," according to the ISO website.  ISO 14001 specifies requirements for an effective environmental management system (EMS) by providing a follow-able framework.

3 0
3 years ago
What is a market economy regulated by?
miskamm [114]

Answer:

Producers and consumers :)

Explanation:

Market economies are run by buyers and sellers, there is no government involved.

6 0
3 years ago
8th business day of this month
Sonbull [250]
Tuesday the twelfth is the answer. A business day is essential a work day, which is Monday through Friday. 
4 0
3 years ago
Other questions:
  • Which of the following best describes the objective of a fraud examination?
    15·1 answer
  • 1.Which might NOT be an option for increasing your present income?
    6·1 answer
  • What are the two fundamental equality requirements of the double-entry accounting system?
    9·1 answer
  • Calculate the simple interest you would receive in one year on a savings account that earns 5% annual interest. your beginning b
    12·1 answer
  • The best way to focus your attention on your most important daily goals is to use a
    14·1 answer
  • External economies of scaleA.lead to the creation of a single large monopoly.B.cannot be associated with a perfectly competitive
    9·1 answer
  • Intangible assets that have an indefinite useful life:
    7·1 answer
  • Last summer, Fabia applied for three jobs. The first required a resume, but nothing else. The second required both a resume and
    12·1 answer
  • I no longer have a question
    11·2 answers
  • I NEED HELP ASAP!!!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!