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
Suppose a computer can execute 1 billion instructions/sec and that a system call takes 1000 instructions, including the trap and
Genrish500 [490]

Answer:

System calls = 500000

Explanation:

Instructions that a computer can execute = 1 billion instructions/sec

Instructions that a system call takes including the trap and context switching = 1000 instructions

When half of the CPU time is on application, n system calls can be executed in 1 second.

Therefore we'll get an equation as following.

1000 * n = 0.5 * 1000000000

n = 0.5 * 1000000000 / 1000

n = 500000

System calls = 500000

3 0
3 years ago
What type of product does amd manufacture
Vitek1552 [10]
AMD makes CPUs, GPUs, Motherboards, Graphics Cards and other computer hardware
6 0
3 years ago
Which is a software application used to analyze an organization’s data to improve decision making?
Ostrovityanka [42]

The software application used to analyze an organization’s data to improve decision making is said to be Business intelligence software.

<h3>What is Business intelligence?</h3>

Business intelligence is known to be a kind of app that has been set up and it is known to have a set of data analysis applications that has been made to meet a lot of information needs.

Business intelligence are known to be a kind of procedural and technical input that takes , stores, and analyzes the data made by a company's activities.

Learn more about Business intelligence from

brainly.com/question/13339276

3 0
1 year ago
Explain the principles of computer applications ​
9966 [12]

Answer:

The nature of computers and code, what they can and cannot do.

How computer hardware works: chips, cpu, memory, disk.

Necessary jargon: bits, bytes, megabytes, gigabytes.

How software works: what is a program, what is "running"

How digital images work.

Computer code: loops and logic.

Big ideas: abstraction, logic, bugs.

3 0
2 years ago
What is the working principle of computer?
ankoles [38]
The CPU is the working principle
8 0
3 years ago
Other questions:
  • What is the penalty for refusing to submit to alcohol testing (drivers ed)
    7·2 answers
  • Semiconductors are only somewhat conductive electronic components.<br><br> True or False?
    14·1 answer
  • Using this tool to help you to visualize your slides and develop your content
    13·1 answer
  • You will be creating a quiz grading program. You will compare the student's answers with the correct answers, and determine if t
    15·1 answer
  • Which operating system (OS) is used to run your laptop?
    15·2 answers
  • Which of the following was most likely used to apply red background and font to some of the cells in column D?
    10·1 answer
  • The TCP _____ is the amount of information that a machine can receive during a session and still be able to process the data.
    5·1 answer
  • You are testing a printer you just installed, so you use the operator panel on the printer to print a test page. Later, you use
    13·1 answer
  • Remember not to use tools that are ________ in any way.
    5·1 answer
  • (b) Cell B12 contains the formula, ROUND((SUM(B5:B9)*D1),1).
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!