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
dmitriy555 [2]
2 years ago
8

Develop a Java program that determines the gross pay for an employee. The company pays hourly rate for the first 40 hours worked

by the employee and time and a half (1.5x hourly rate) for all hours worked in excess of 40. The user of your application will enter an employee name, shift (day or night) ,the number of hours worked for the week and their hourly rate. Your program should then calculate and display the employee’s name, regular pay, overtime pay, total gross pay and payperiod. PayPeriod is "Friday" for "day" shift and "Saturday" for "night" shift. Use class Scanner to input the data. Be sure to format output, so it is professionally displayed to your users.Here is an example of pseudocode:StartEnter employee nameEnter employee shift (day/night)Enter hours workedEnter hourly pay rateCalculate reg payif hours worked > 40 thenCalculate overtime payelseovertime = 0Calculate total payOutput employee name, reguldar pay, overtime pay, total payIf day shiftoutput "Friday payperiod"Elseoutput "Saturday payperiod".End.
Computers and Technology
1 answer:
Neko [114]2 years ago
6 0

Answer:

// Program is implemented using Java Programming Language

// Comments are used for explanatory purpose

// The program starts here

import java.util.Scanner;

public class CalcRate

{

public static void main (String [] args)

{

//Call scanner function

Scanner input = new Scanner(System.in);

//Variable Declaration

int hour;

double regpay, overtime, total, hourlyrate;

string name,shift;

// Input employee details

System.out.print("What's your name: ");

name = input.nextLine();

System.out.print("What's your Shift: ");

shift = input.nextLine();

System.out.print("Numbers of hours worked: ");

hour = input.nextInt();

System.out.print("What's your hourly pay rate: ");

hourlyrate = input.next.Double();

// Calculate worker's pay

if(hour<=40)

{

regpay = hourlyrate * hour;

overtime = 0;

}

else

{

overtime = (hour - 40) * 1.5 * hourlyrate;

regpay = 40 * hourlyrate;

}

total = regpay + overtime;

// Print payment details

System.out.println(" Employee name: "+name);

System.out.println(" Regular Pay: "+regpay);

System.out.println(" Overtime Pay: "+overtime);

System.out.println(" Total Pay: "+total);

// Print shift output

if(shift == "Day)

{

System.out.println(" Friday day period: ");

}

else

{

System.out.println(" Saturday day period: ");

}

}

}

You might be interested in
Are the actions legal or illegal?
garik1379 [7]

Answer:

No, Company will not pay

Explanation:

At the last point of the final deal, any significant sum of money does not fall into the frame.

It was important to address the exact amount needed to update the research on agriculture. They might be asking for inflated amounts.

3 0
3 years ago
A company is looking for an employee to design and test connections in its
kolbaska11 [484]

The employee that design and test connections in its computer systems is in the computer architecture field.

<h3>What is design and test connections?</h3>

This is known to be a field in computer system where system engineers makes a lot of computer designs and also involve in testing of connections such as internet connections, etc.

Note that The employee that design and test connections in its computer systems is in the computer architecture field and they are known to be Computer software engineers

Learn more about  Computer jobs from

brainly.com/question/24588527

#SPJ1

8 0
1 year ago
A/An is a series of instructions or commands that a computer follows; used to create software
miss Akunina [59]
Program or algorithm

They are synonymy's  
8 0
2 years ago
Read 2 more answers
Kitchen Gadgets
Scilla [17]

Answer:

hehe

Explanation:

7 0
2 years ago
What is the next line? &gt;&gt;&gt; tupleB = (5, 7, 5, 10, 2, 7) &gt;&gt;&gt; tupleB.count(7) 1 0 5 2
dybincka [34]

Answer:

The right answer is option 4: 2

Explanation:

Lists are used in Python to store elements of same or different data types.

Different functions are used in Python on List. One of them is count.

Count is used to count how many times a specific value occurs in a list.

The syntax for count is:

listname.count(value)

In the given code,

The output will be 2

Hence,

The right answer is option 4: 2

3 0
2 years ago
Other questions:
  • The ____ shortcut keys remove character formatting. (points : 2) ctrl 0 (zero) ctrl i ctrl spacebar ctrl u
    8·2 answers
  • One type of technology that can verify a person's identity is _____.
    6·2 answers
  • An increase in Consumption will ___________ in the Classical Model of Aggregate Demand.
    13·1 answer
  • In the written Hawaiian language, only 13 letters are used: the five vowels (a,e,i,o, and u), and 8 consonants (h,k,l,m,n,p,w, a
    10·1 answer
  • What should be done with statements or sections which are unclear?
    12·2 answers
  • Science Help
    11·1 answer
  • What are the benefits of building redundancy into a network?
    12·1 answer
  • How can you stretch or skew an object in paint
    13·1 answer
  • How does a computer do its work? Mention its working principle.<br><br>​
    8·1 answer
  • 10.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!