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
Research and development costs should be: A. Expensed in the period incurred. B. Expensed in the period they are determined to b
Vladimir79 [104]

Answer:

The correct answer is letter "A": Expensed in the period incurred.

Explanation:

Research and Development (R&D) costs are spent on the development of new products that could or could not end up being commercially offered. These kinds of costs are usually expensed at the same time they are incurred. According to the U.S. Statement of Financial Accounting Standards, the R&D costs cannot be capitalized.

6 0
3 years ago
A customer has a fully paid options position and is long marginable stock. Subsequently he receives a margin call on his long st
Feliz [49]

Answer: II and III

Explanation:

From the question, we are informed that a customer has a fully paid options position and is long marginable stock and that subsequently he receives a margin call on his long stock position.

The statements that are true are that the customer cannot borrow against the long options contracts to satisfy the margin call and the long option contracts have a loan value of 0%.

Therefore, option C is the right answer.

8 0
3 years ago
Innovations imagine is a new york-based business that specializes in creating new products for the market place. as the company
Citrus2011 [14]

The important consideration for this company is that they should think or have at least the idea of the patents, trade secrets and copyrights are being treated differently by the countries in which is one way of helping them of how they should struggle or do their way of doing things.

3 0
3 years ago
have an annual coupon rate of 8 percent and a par value of $1,000 and will mature in 20 years. If you require a 7 percent return
ololo11 [35]

Answer:

I will be willing to pay $1,106 for a vanguard bond.

Explanation:

Coupon payment = Par value x Coupon rate

Coupon payment = $1,000 x 8%

Coupon payment = = $80

Price of bond is the present value of future cash flows, to calculate Price of the bond use following formula:

Price of the Bond = C x [ ( 1 - ( 1 + r )^-n ) / r ] + [ F / ( 1 + r )^n ]

Price of the Bond =$80 x [ ( 1 - ( 1 + 7% )^-20 ) / 7% ] + [ $1,000 / ( 1 + 7% )^20 ]

Price of the Bond = $80 x [ ( 1 - ( 1.07 )^-20 ) / 0.07 ] + [ $1,000 / ( 1.07 )^20 ]

Price of the Bond = $848 + $258

Price of the Bond = $1,106

6 0
3 years ago
Suppose that the nominal interest rate in Japan is only 2.02.0 ​percent, while the comparable rate in the United States is 4.04.
Svetach [21]

Answer:

Japan

Explanation:

Data provided in the question

Japan Nominal interest rate = 2.0%

U. S Nominal interest rate = 4.0%

Japan inflation rate = 0.50%

U.S inflation rate = 3.0%

Now the formula to compute the real interest rate is

Real interest rate = Nominal interest rate - inflation rate

For Japan, it is

= 2% - 0.50%

= 1.50%

For U.S, it is

= 4.0% - 3.0%

= 1.0%

So as we can see that highest rate interest rate is 1.50% i.e of Japan

6 0
3 years ago
Other questions:
  • The WorldLight Company produces two light fixtures (products 1 and 2) that require both metal frame parts and electrical compone
    15·1 answer
  • During 2019, half of the treasury stock was resold for $180,000; net income was $510,000; cash dividends declared were $1,320,00
    9·1 answer
  • America spend the largest portion of their budget on___.
    10·1 answer
  • A formula that calculates the total dollar value of all goods and services produced in a nation and all the goods and services p
    14·1 answer
  • The warsaw pact was a merger of communist nations after world war ii as a reaction to this alliance of democratic nations
    15·1 answer
  • Prepare a bank reconciliation as of October 31 from the following information:
    14·1 answer
  • A manufacturer of a very labor-intensive product wishes to employ the 'experience curve' to predict the AVC associated with vari
    15·1 answer
  • How do you give brainliest?<br><br> I cant figure it out.
    6·2 answers
  • (Consider This) When the federal government started requiring restaurants to print calorie counts next to menu items:__________.
    10·1 answer
  • The economic term for the want-satisfying ability, or value, that organizations add to goods or services is
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!