subject

The following program calculates yearly and monthly salary given an hourly wage. The program assumes work-hours-per-week limit of 40 and work-weeks-per-year of 50.Overtime refers to hours worked per week in excess of some weekly limit, such as 40 hours. Some companies pay time-and-a-half for overtime hours, meaning overtime hours are paid at 1.5 times the hourly wage. Overtime pay can be calculated with pseudocode as follows (assuming a weekly limit of 40 hours):weeklyLimit = 40 if weeklyHours <= weeklyLimit weeklySalary = hourlyWage * weeklyHourselse overtimeHours = weeklyHours - weeklyLimit weeklySalary = hourlyWage * weeklyLimit + (overtimeHours * hourlyWage * 1.5)1.Run the program and observe the salary earned.2. Modify the program to read user input for weeklyHours. Run the program again. import java. util. Scanner;public class Salary { public static void main(String [] args) {Scanner scnr = new Scanner(System. in);int hourlyWage = 0;int weeklyHours = 0;int weeklySalary = 0;int overtimeHours = 0;final int WEEKLY_LIMIT = 40;System. out. println("Enter hourly wage: ");hourlyWage = scnr. nextInt();// FIXME: Get user input value for weeklyHoursweeklyHours = 40;if (weeklyHours <= WEEKLY_LIMIT) {weeklySalary = weeklyHours * hourlyWage;}else {overtimeHours = weeklyHours - WEEKLY_LIMIT;weeklySalary = (int)((hourlyWage * WEEKLY_LIMIT) +(hourlyWage * overtimeHours * 1.5));}System. out. print("Weekly salary is: " + weeklySalary); return;}}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
You know the right answer?
The following program calculates yearly and monthly salary given an hourly wage. The program assumes...
Questions
question
English, 20.07.2019 13:00
question
History, 20.07.2019 13:00
Questions on the website: 13722367