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
When an interviewer asks "tell me about yourself", you should tell them about your childhood past. please select the best answer
Yanka [14]

In the interview when the candidate is asked about yourself then telling about childhood past is not correct. Therefore the given statement is false.

<h3>What is an interview?</h3>

An interview is an interaction or a conversation between an employer and the interested candidate. In the conversation the interviewee is asked about their education, family background, and work experiences.

When an interviewer ask about tell me about yourself, then the interviewee should not tell about their childhood past, rather the interviewee should give few information about their family, education, and working.

Therefore, the given statement is false.

Learn more about interview, here:

brainly.com/question/13073622

#SPJ1

7 0
2 years ago
How do I get rid of this?
kherson [118]

There Is an App that you downloaded that allows this. you have to find it and disable it

3 0
3 years ago
Read 2 more answers
If you change a column header in your data source, what would you press to ensure that the data is synced as expected?
kobusy [5.1K]

You should press the Match Fields to ensure that the data is synced as expected.

8 0
3 years ago
When creating an ad, how does Greg know what it will look like to his potential customers?
gladu [14]

Answer:

Greg can see previews of his ad in the Preview tab of his Google My Business account.

Google My Business is a free tool for businesses to manage their online existence across Google including Search and Maps. It also provides them to edit their business information which helps customers to find their business. They can also find how many customers searched for their business.

So once Greg's ad has been officially accepted, he can enter the specific keywords he’s targeting to have a generic view  of the ad in the browser. Google gives examples of desktop ads using the keywords selected in the campaign to make a general preview.  As Greg types his URL, headline, and description, a generic preview of mobile and desktop versions of his ad will show up.

3 0
3 years ago
True or false? because you have made it a practice to never access the
Flauer [41]

Answer: False

Explanation: Even if the internet service is not connected with the operating system while accessing the database, it is still on risk and can be vulnerable to get attacked. Devices of the system like USB drive can happen to have the malware which creates the risk towards database.

The computer system can get invoked with the virus or other attack while the user connects the internet afterwards when he/she is not accessing the database, these malware get stored in system once they get invoked and corrupt the system and its database even when the internet connection is not present .Thus, the statement given is false.

6 0
3 years ago
Other questions:
  • The _________ specifies the station(s) for which the frame is intended. it may be a unique physical address, a group address, or
    5·1 answer
  • A network administrator is using packet tracer to mock up a network that includes iot devices. What can the administrator do fro
    15·1 answer
  • The only requirement of __________ is that the sender must provide some mechanism whereby the receiver can opt out of future ema
    14·1 answer
  • What does zooming do? A. Changes your view of the Frame Editor to be closer or farther away B. Changes your view of the Event Ed
    12·1 answer
  • Which password is an ideal and secure password?
    6·2 answers
  • Nonprogrammed decision
    7·1 answer
  • Which of the following best describes a feedback loop?
    11·1 answer
  • The transmission control protocol (TCP) layer helps computers to communicate in which of the following ways?
    10·1 answer
  • HELP ME PLZZZ I'll give brainist​
    9·1 answer
  • There are several possible reasons why a high percentage of IT projects are abandoned-the business strategy changed, technology
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!