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
National Park Tours Co. is a travel agency. The nine transactions recorded by National Park Tours during May 2019, its first mon
lana66690 [7]

Answer:

National Park /Tours Co.

National Park Tours Co.

Unadjusted Trial Balance

May 31, 2019

Account Titles                Debit       Credit

Cash                            $10,700

Equipment                   25,000

Drawing                         3,500

Accounts receivable     3,500

Accounts payable                          $ 1,750

Fees Earned                                   13,900

Supplies                       2,450

Capital                                            34,700

Operating expenses   5,200

Totals                      $50,350     $50,350

Explanation:

a) Data and Calculations:

T-accounts

Cash

Account Titles                Debit       Credit

Beth Worley, Capital  (1) 34,700

Supplies                                      (2) 2,450

Equipment                                  (3) 4,500

Operating expense                   (4) 3,800

Accounts payable                    (5) 18,750

Accounts receivable (6) 10,400

Operating expense                   (8) 1,400

Drawings                                  (9) 3,500

Balance                                        10,700

Totals                         $45,100  $45,100

Equipment

Account Titles             Debit       Credit

Cash                         (3) 4,500

Accounts payable (3) 20,500

Balance                                       25, 000

Totals                       $25,000   $25,000

Beth Worley, Drawing

Account Titles           Debit       Credit

Cash                     (9) 3,500

Accounts Receivable

Account Titles           Debit       Credit

Fees Earned     (7) 13,900

Cash                                    (6) 10,400

Balance                                      3,500

Totals                   $13,900    $13,900

Accounts Payable

Account Titles           Debit       Credit

Equipment                             (3) 20,500

Cash                    (5) 18,750

Balance                      1,750

Totals                   $20,500     $20,500

Fees Earned

Account Titles           Debit       Credit

Accounts receivable            (7) 13,900

Supplies

Account Titles           Debit       Credit

Cash                   (2) $2,450

Beth Worley, Capital

Account Titles           Debit       Credit

Cash                                       (1) 34,700

Operating Expenses

Account Titles           Debit       Credit

Cash                     (4) 3,800

Cash                     (8) 1,400

Balance                                       5,200

Totals                    $5,200       $5,200

3 0
3 years ago
Please help branliest to correct answer no guessing please
timofeeve [1]

Answer:

Education..

Explanation:

Hope i helped u..

4 0
3 years ago
Stadium owners have often been accused by business owners of doing what to the prices for sponsorship opportunities
slega [8]
The answer is A. inflation
8 0
3 years ago
Brian wants to conduct an online search with a certain phrase. He intends to use the words business strategies that were adopted
12345 [234]

he should type the whole phrase into a search engine and have quotation marks

6 0
4 years ago
Read 2 more answers
Why would a large publically traded corporation likely prefer issuing bonds as a way to raise new money as opposed to issuing mo
Setler79 [48]

Answer:

B. more shares will dilute the existing value of the stock, causing its market price to fall

Explanation:

A bond can be defined as a debt or fixed investment security, in which a bondholder (creditor or investor) loans an amount of money to the bond issuer (government or corporations) for a specific period of time.

Generally, the bond issuer is expected to return the principal at maturity with an agreed upon interest to the bondholder, which is payable at fixed intervals.

The reason a large publicly traded corporation would likely prefer issuing bonds as a way to raise new money as opposed to issuing more shares is because more shares will dilute the existing value of the stock, causing its market price to fall and may negatively affect by reducing the value and proportional ownership of the investor's shares in the corporation.

8 0
2 years ago
Other questions:
  • Susan purchases and places in service property costing $1,050,000 in 2019. She wants to elect the maximum Sec. 179 deduction all
    5·1 answer
  • Countries A and B both produce bicycles. Country B has a comparative
    15·1 answer
  • Yo tell me if this is true.. i walk down the sidewalk and found a grass hooper and ate it...
    7·2 answers
  • If there is an increase in market demand in a perfectly competitive market, then in the short run
    7·1 answer
  • How much does a trumpet weigh?
    8·2 answers
  • Alternating periods of economic expansion and recession are known as the:_______.
    15·1 answer
  • Which of the following would be considered part of a firm's general environment?
    11·1 answer
  • To measure ingredients accurately, it is best to measure items in as many
    10·2 answers
  • On Mr. Casper’s debate team at Thunderbird High School, 20% of the members are Sophomores, 35% are Juniors and 45% are Seniors.
    12·1 answer
  • The total return on a stock is equal to the: Group of answer choices dividend divided by the sum of the dividend yield and capit
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!