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]
3 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]3 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
DeShawn uses Google Ads. He wants to enable website call conversion tracking so he can see how his current ad campaign is drivin
eimsori [14]

Answer:

A dynamically created Google forwarding number

Explanation:

A temporary number that is used to forward the call that are  assigned to a Google Ads call extension is called Google forwarding number. This number is used to forwards calls to the advertiser's phone number for the purpose of tracking call conversions.

These number are created dynamically to trace the advertisers conversation.

5 0
3 years ago
True/False: Software engineering is a field that encompasses designing, writing, testing, debugging, documenting, modifying, and
Natali [406]

Answer:

The answer is "True".

Explanation:

The software engineering is the mechanism by which end-user programs are evaluated and planned, to built and reviewed, and fulfill these needs by using language software programming.

  • The fundamental goal of software engineering is to design software, that uses the techniques and processes, that are applied to make large systems and frequently used to produce quality applications.
  • It is also used in modifying and maintaining software.

7 0
3 years ago
What are the inputs and outputs of the app "Spotify"?
Anastasy [175]

Hey the I/O for Spotify would be. for I or input keyboard and mouse.

and for O or output the sound files being sent from the server to the pc

Hope this helps.

-Toby  aka scav

6 0
3 years ago
c++ Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum
ElenaW [278]

Answer:

#include <iostream>

#include <cstdlib>

 

using namespace std;

 

int main(){

 

 

   int sum=0, num=5;   //variables declaration and inicialization

 

   while (sum<500){   //conditioning to do the sum up to 500

   sum=sum+num;     //actually sum process

   cout << "The value is: "<<sum;   //show the result in screen

   };

   return 0;

}

5 0
4 years ago
SOMEONE PLEASE HELP ME WITH THIS PLEASE!!!!!!
Brrunno [24]

Answer:

first one

Explanation:

3 0
3 years ago
Other questions:
  • The critical path in a project network is:______ A. The Shortest path through the network. B. Longest path through the network.
    8·1 answer
  • How to know if somebody else is listening my conversations by cellphone?
    13·1 answer
  • If you want to adjust the width of a column manually, move your mouse over the _______ column boundary and click and drag until
    9·1 answer
  • Write calls to printf to display the variable x in the following formats:
    8·1 answer
  • A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
    9·1 answer
  • When determining the amount of RAM necessary for a computer you wish to purchase, what should you consider?
    7·1 answer
  • An administrative assistant types a document, saves, and prints. The assistant is using _____.
    13·1 answer
  • What can an attacker use to capture switch traffic that wouldn't normally be sent to the port the sniffer is attached to?
    5·1 answer
  • Explain how principles of computer programming are applied in different languages to produce
    5·1 answer
  • How desktop case or chassis designed?, material and steps?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!