Computes the raise and new salary for an employee

Assignment Help JAVA Programming
Reference no: EM131141707

QUESTION?

Complete the following program to determine the raise and new salary for an employee by adding if ... else statements to compute the raise.

The input to the program includes the current annual salary for the employee and a number indicating the performance rating.

An employee with a rating of 1 will receive a 6% raise, an employee with a rating of 2 will receive a 4% raise, and one with a rating of 3 will receive a 1.5% raise. ? What if no raise is entered?

// Salary.java
// Computes the raise and new salary for an employee
//
import java.util.Scanner;
public class Salary
{
public static void main (String[] args)
{
double currentSalary; // current annual salary
double rating; // performance rating
double raise; // dollar amount of the raise
Scanner scan = new Scanner(System.in);
// Get the current salary and performance rating
System.out.print ("Enter the current salary: ");
currentSalary = scan.nextDouble();
System.out.print ("Enter the performance rating: ");
rating = scan.nextDouble();
// Compute the raise -- Use if ... else ..

// Print the results
System.out.println ("Amount of your raise: tiny_mce_markerquot; + raise);
System.out.println ("Your new salary: tiny_mce_markerquot; + currentSalary + raise);
}
}

Reference no: EM131141707

Questions Cloud

Calculate the square footage of a house : You have begun work at a realty office. You have been asked to develop a program that helps realtors calculate the square footage of a house based on measurements of the rooms of the house
Determine an alternative to arraylists using strings : I am attempting to determine an alternative to ArrayLists using strings and arrays. Additionally, one of the conditions of the assignment is that I have to support using a file (perhaps a comma delimited text file) to populate the vending machine..
Write down a detailed description of the problem : Using the simplified OOD methodology: Write down a detailed description of the problem. Identify all the (relevant) nouns and verbs
Write a java program to accept a day number from the user : Write a Java program to accept a day number from the user and display the corresponding day name by using the if/else construct
Computes the raise and new salary for an employee : Computes the raise and new salary for an employee. Complete the following program to determine the raise and new salary for an employee by adding if ... else statements to compute the raise
Design a class named mydate : Design a class named MyDate. The class contains: The data fields year, month, and day that represesents a date. month is 0-based, i.e., 0 is January. A no-arg constructor that creates a MyDate object for the current date
Calculate the additional amount of sales : The application will now compare the total annual compensation of at least two salespersons. It will calculate the additional amount of sales that each salesperson must achieve to match or exceed the higher of the two earners
Calculate the kilometers : Write a program called MilesToKilometers that converts miles to kilometers. Read the miles value from t he user as a double point value. Calculate the kilometers

Reviews

Write a Review

JAVA Programming Questions & Answers

  Program to display the original value

For each value read, your program should display the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to the nearest thousandth.

  Calculate the average number of miles you ran

What is your list length? Calculate the sum of the total miles you spent running over the 10 weeks. Calculate the average number of miles you ran. Write a search to determine whether 4 is on your list

  Implement your client-server system

A detailed discussion of the methodology you used to implement your client-server system and a concise and detailed design for the client-server system

  Display an image of an apple on the screen

Display an image of an apple on the screen, then after 3 seconds automatically change the display to an orange.

  Provide a regular expression that shows the set of strings

Provide a regular expression that shows the set of strings over {a, b} thatcontain at least one b if its length is at least four.

  Create pipe-and-filter network that will read data stream

Create a pipe-and-filter network that will read the data stream in FlightData.dat file, convert the temperature measurements from Fahrenheit to Celsius, and convert altitude from feet to meters - How would this impact the key quality attributes of ..

  Find and fix the bug that is creating the exception error

Find and fix the bug that is creating the exception error message in the program in our AVL tree implementation. Make sure to explain the bug and how to fix it.

  Create java program to calculate the net pay for an employee

Create a Java Program to calculate the net pay for an employee. In this payroll program, you will need to allow the user to input the following information Input your First Name: Elmer.

  Which drags html list items to and from a javascript array

Write a program which drags html list items to and from a javascript array.

  Default and parameterized constructors

Create a class Count with a data member current_count with proper access specifier. Create another tester class (which has main method) to instantiate two counters of Count class.

  Define the kernel mode in operating system

Define the kernel mode in operating system

  Technical community blog

Write a blog article for a coding and technical community blog.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd