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
Which of the following phrases might be useful in writing the purpose statement for your formal report? Check all that apply. Th
Elina [12.6K]

Answer:

Hi

The report is a text written in prose with the objective of informing a specific reader or readers about the specific events or activities. The purpose of the report is to inform. However, the reports may include persuasive elements, such as recommendations, suggestions or other conclusions that indicate possible future actions that the reader of the report could take. It must have the following characteristics:

-It must be an expository text.

-It must be an explanatory text.

-Its purpose is to give information on research results.

-You should focus on a specific topic.

-You must use an objective language.

-You must write in the third person.

-Its predominant structure is the enunciative.

-In this type of texts there is also an argumentative structure.

-In these reports the descriptive structure appears because facts are described.

Explanation:

6 0
3 years ago
To recover damages in a breach-of-contract case, the plaintiff must demonstrate that he used reasonable efforts to minimize the
Aleonysh [2.5K]
It's is true wait yeah it's A true
5 0
3 years ago
Job 243 was recently completed. The following data have been recorded on its job cost sheet: Direct materials $ 51,870 Direct la
Virty [35]

Answer:

$19.20

Explanation:

Computation for the unit product cost that would appear on the job cost sheet for this job.

First step is to compute the Total Product cost

Job 243

Direct material $ 51,870

Direct labor (435*11) 4,785

Overhead (516*13) 6,708

Total Product cost $63,363

Now let Compute the unit product cost

Unit product cost=$63,363/3,300 units

Unit product cost =$19.20

Therefore the unit product cost that would appear on the job cost sheet for this job is $19.20

8 0
3 years ago
Allegheny Company ended Year 1 with balances in Accounts Receivable and Allowance for Doubtful Accounts of $82,000 and $4,500, r
Cerrena [4.2K]

Answer: $10,700

Explanation:

The Uncollectible Account Expense is the Accounting Adjustment made when a Receivable defaults on their debt and it can be calculated using the following formula,

= Uncollectible Amount written off + Closing Balance - Opening Balance.

Now the balances are as follows,

Opening Balance for Year 2 = 4,500

Closing Balance for Year 2 = 6,800

Uncollectible Amount written off during Year 2 = 8,400

Calculating therefore,

= 6,800 + 8,400 - 4,500

= $10,700

Allegheny will report $10,700 as Uncollectible Accounts Expense for Year 2.

3 0
3 years ago
Acton Corporation, which applies manufacturing overhead on the basis of machine-hours, has provided the following data for its m
loris [4]

Answer:

The overhead for the year was $130,075

Explanation:

GIVEN INFORMATION -

                                                    ESTIMATED                              ACTUAL

Manufacturing overhead            $132,440                                   $128,600

Machine hours                             2800                                           2750

Here for calculating the overhead for the year we will use the following formula =      

\frac{Estimated Manufacturing Overhead}{Estiamted Machine Hours}\times Actual Machine Hours

= \frac{\$132,440}{2800}\times 2750

\$47.3\times 2750 = \$130,075

Therefore the overhead for the year was $130,075

                                   

5 0
3 years ago
Read 2 more answers
Other questions:
  • Hillsdale is considering two options for comparable computer software. Option A will cost $25,000 plus annual license renewals o
    13·1 answer
  • 4. What is labeling theory?|
    5·1 answer
  • A customer opens an account at a brokerage firm to purchase securities in an offering. The customer must receive the disclosure
    8·1 answer
  • currently, a firm has an EPS of $2.08 and a benchmark PE of 12.7. Earning are expected to grow by 3.8 percent annually. What is
    8·1 answer
  • Small percentage changes in an amount from a company's financial statement may still represent large dollar amounts; therefore,
    12·1 answer
  • Which management program aims to reduce manufacturing defects to only 3.4 per million? reengineering total quality management ma
    7·1 answer
  • What is the term for when businesses produce goods and services that consumers do not want​
    9·1 answer
  • Alfarsi Industries uses the net present value method to make investment decisions and requires a 15% annual return on all invest
    13·1 answer
  • Management needs to be prepared to deal with problems and seize opportunities as they arise. A company often identifies alternat
    12·1 answer
  • Which command is used to draw visible line form invisible line mode *
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!