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
eduard
2 years ago
5

Write a java application that will determine the salary for each of several employees. The

Computers and Technology
1 answer:
nalin [4]2 years ago
4 0

The program illustrates the use of repetitive operations.

The program in java is as follows, where comments are used to explain each line

import java.util.*;

public class Main{

   public static void main(String [] args){

<em>//This creates a scanner object</em>

       Scanner input = new Scanner(System.in);

<em>//This declares employee number and hours, as integer</em>

       int empNum, hrs;

<em>//This declares the rate and pay (salary) as double</em>

       double rate,pay;

<em>//This gets input for employee number</em>

       empNum = input.nextInt();

<em>//The following while operation is repeated until user inputs -1</em>

       while(empNum != - 1){

<em>//This gets input for worked hours</em>

           hrs = input.nextInt();

<em>//This gets input for work rate</em>

           rate = input.nextDouble();

<em>//This calculates the pay (base salary)</em>

           pay = rate * hrs;

<em>//If worked hours is more than 40</em>

           if(hrs >40){

<em>//This calculates the additional pay</em>

               pay += 0.5 * pay;

           }

<em>//This prints the total salary</em>

           System.out.println("Salary: "+pay);

<em>//This gets input for the employee number            </em>

           empNum = input.nextInt();

       }

   }

}<em>// The program ends here</em>

At the end of the program, the program prints the employee's salary

See attachment for sample run

Read more about java programs at:

brainly.com/question/15831954

You might be interested in
CIST 1122 Project 2 Instructions
NikAS [45]

Answer:

it is suppost ro be at

least 20 tb

Explanation:

5 0
2 years ago
Tanner is creating a brochure for his Web-hosting company. He designed the layout and placed a picture in the center of the page
Romashka [77]
Resizing is a very simple process. On the photo editing program, simply click on the image, and if resize handles appear around it, click and drag those to the desired size. If the program has a dedicated resizing or rescaling tool, use it and follow the above instructions. Keep the photo proportionate by holding down the shift key while dragging a corner handle. <span>Tanner has to make sure that his photo his of a high enough resolution to resize. A pixellated or blurry photo will only get worse when scaled up. He also has to make sure he doesn't resize it to be too big or it will also end up pixellated.</span>
5 0
3 years ago
Who is in the age range of 13-15 and wants to join a mine craft smp?
Ratling [72]

Answer: Wow that's really cool!

3 0
2 years ago
What are all the physical components called?
Alecsey [184]

Physical Components to a computer are called hardware.

3 0
3 years ago
Game design is iterative. What does this mean?
Furkat [3]

Answer:  

What does Iterative Game Design mean?

Iterative game design is the process by which a video game is repeatedly proposed, prototyped, play tested and reevaluated prior to working product release. Iterative game design operates on the following principle: It is unrealistic to create an ideal product on the first try.

By creating and testing working models on core criteria (such as fun), game designers are able to refine product on a gradual basis and increase market success potential.

3 0
3 years ago
Other questions:
  • Page No.:
    11·1 answer
  • Why would an IT technician ever have to change out a computer’s motherboard?
    5·2 answers
  • Fifty part-time students were asked how many courses they were taking this term. The (incomplete) results are shown below. Need
    6·1 answer
  • Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
    7·1 answer
  • What Are the Benefits of Using Leads Automation Tool?
    5·1 answer
  • Evaluate if the following function is a good candidate to be placed in a library. Why or why not?
    10·2 answers
  • If you have limited means, you...?
    9·1 answer
  • A variable is assigned a value on line 328 of a program. Which of the following must be true in order for the variable to work?
    12·2 answers
  • You have installed Windows Server 2016 on a new server and want to centralize user logons and security policies. What type of so
    13·1 answer
  • A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!