answer.
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
Irina-Kira [14]
2 years ago
14

Write a complete Java program that: Prompts an employee to enter the number of hours that they have worked in a given week and s

tores their response in a variable named hoursWork - Only whole hours are tallied, no partial hours Prompts the employee to enter their hourly wage in dollars and stores their response in a variable named payRate Computes the employee's weekly pay check under the following rules: All hours up to and including 40, are paid at exactly the employee's hourly wage - regular pay Any / All remaining hours, are paid at one and one half times the employee's hourly wage - overtime pay Displays to the screen a brief report including: The value of all of each of the user's inputs The amount of regular pay earned The amount of overtime pay earned You can find two separate sample runs of such a program in the unnamed box below the editor window.
Computers and Technology
1 answer:
GalinKa [24]2 years ago
4 0

Answer:

The solution is given in the explanation section

See comments for detailed explanation of each step

Explanation:

import java.util.Scanner;

public class QuestionOne{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       //Prompt User for input

       System.out.println("Enter Number of Hours worked this week");

       //Receive the value for number of hours

       int hoursWork = in.nextInt();

       //Prompt user for hourly wage rate

       System.out.println("Enter your hourly rate");

       double payRate = in.nextDouble();

       //compute pay

       double regularPay =0;

       //Calculate pay When there is no overtime

       if(hoursWork <= 40){

          regularPay = hoursWork*payRate;

           System.out.println("You worked for a total of "+ hoursWork+" at "+payRate

                   +" per hour, Your total pay is "+ regularPay);

       }

       // Calculate overtime pay

       //Obtain overtime by subtracting 40 from the total hours

       else{

           int extraHours = hoursWork-40;

           double overTimePay = extraHours*(1.5*payRate);

           regularPay = 40*payRate;

           System.out.println("You worked for "+hoursWork+" your regular pay is "+ regularPay+

                   " and your overtime pay is "+overTimePay);

       }

   }

}

You might be interested in
Which type of network topology lets you see which end devices are connected to which intermediary devices and what media is bein
m_a_m_a [10]

Answer:

Star Topology

Explanation:

Star network topologies are common in home networks, where the central connection point may be a router, switch, or network hub. Unshielded Twisted Pair (UTP) Ethernet cabling is typically used to connect devices to the hub, though coaxial cable or optical fiber may also be employed.

5 0
2 years ago
Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
Gre4nikov [31]

Answer:

numInsects = 16

while numInsects < 200:

   print(str(numInsects) + " ", end="")

   numInsects *= 2

Explanation:

*The code is in Python.

Set the numInsects as 16

Create a while loop that iterates while numInsects is smaller than 200. Inside the loop, print the value of numInsects followed by a space. Then, multiply the numInsects by 2.

3 0
2 years ago
A new company starts up but does not have a lot of revenue for the first year. Installing anti-virus software for all the compan
Feliz [49]

WAN domain which stands for Wide Area Network and consists of the Internet and semi-private lines. The <span>RISKS are: Service provider can have a major network outage, Server can receive a DOS or DDOS attack</span> and A FTP server can allow anonymously uploaded illegal software.





7 0
2 years ago
Each level of a smartphone app adds more gems for you to match. On level one, there were 13 gems. On level twelve, there were 12
Sidana [21]
<span>Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 to 123
We have to increase from 13 to 123 over a span of 11 levels.
That's an increase of 110 over 11 levels.
110 / 11 = 10
So we go up 10 gems each level Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 23 33 43 53 63 73 83 93 103 113 123</span>
5 0
2 years ago
Several surprising findings were revealed in the wake of the Target breach, providing a cautionary tale for all executives and s
Akimi4 [234]

Answer: (a) Target had security software, but the notification alerts from the software were  ignored.

Explanation:

The security software was there in target but its notification alerts being ignored was something which was not thought to have been occurred during the Target security breach, as anyone could be alerted with the notification alert.

6 0
2 years ago
Other questions:
  • Donna often travels around the world. When she travels, she needs to access her emails from different locations. However, to kee
    6·2 answers
  • Identify the normalized form of the mantissa in 111.01.
    14·1 answer
  • . When you have multiple graphics positioned on a page, you can _______________ them so that they are a single graphic instead o
    9·1 answer
  • Without using any additional variables, and without changing the values of ndays or the elements of the parkingTickets array, wr
    14·1 answer
  • The term Electronic Privacy Information Center (EPIC) refers to a form of the digital subscriber line technology, which enables
    6·1 answer
  • Implement the function couple, which takes in two lists and returns a list that contains lists with i-th elements of two sequenc
    8·1 answer
  • Program documentation _____. Group of answer choices describes the inputs, outputs, and processing logic for all program modules
    6·1 answer
  • 1. (1 point) Which flag is set when the result of an unsigned arithmetic operation is too large to fit into the destination? 2.
    13·1 answer
  • Describe the ways in which a computer-aided design (CAD) drawing makes the details of an image easier to understand.
    11·2 answers
  • On the Direct Marketing worksheet, create appropriate range names for Design Fee (cell B8), Cost Per Ad (cell B9), Total Clicks
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!