Question: Create an Eclipse Java project called Salary, with a Java class called Salary. 1. Copy and paste the following code, compile and run the program

Create an Eclipse Java project called Salary, with a Java class called Salary. 1. Copy and paste the following code, compile and run the program to test it. 2. Change the salary variable wherever it exists to grossPay. 3. Add a variable to store taxRate (use camelCasing when creating variables that are compound words, i.e. twoOrMoreWords. 4. Display the salary before taxes (as shown). 5. Create a variable with the appropriate data type and compute taxAmount as a dollar value. 6. Create a variable to store net pay. 7. Display the taxAmount, taxRate, and net pay. 8. Add appropriate comments including a single line comment with your name Written by Your Name. Also, add a multi-line comment with identifying information

// Starting Code: public class Salary { public static void main (String [] args) { // declare variables double wage=12.50; int hours = 20; int weeks = 52; double salary=0.0; // generate messages System.out.println("Salary Calculator Program"); System.out.print("Your Annual Salary is: "); // perform calculations salary = wage * hours * weeks; System.out.println(salary); System.out.println( **** End of Program ****); return; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!