Advertisement

05.13.2007 at 07:38PM PDT, ID: 22569674
[x]
Attachment Details

Java program for Employee class variation

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6
Tags:

java, employee, program, class

To helpers,

This question is a practice exercise given to me in a begineers Java course.  The truth is, if I can get the code for this one, I will be able to work off it to help me with the review at the end of the chapter.   I have pretty much understood everything up to this point, but the material dealing with classes and methods has taken me for a loop.  Any help on this would be GREATLY appreciated.  

    Write a class Employee with the following specifications:
    Fields:
        Name - Name of employee
        Id - Employee id
        Salary - Employee salary
        Age - Employee age
        Position - Employee title

    Methods:
        1. getFedTax() - Returns (int) federal tax withheld. Computed as follows:
        multiply (salary - 800) by 17%.
        2. getSsTax(rate) - returns (int) social security tax withheld, rate% of salary;
        rate is int.
        3. getHealthFee(rate) - returns(int) health coverage employee contribution,
        rate% of salary; rate is int.
        4. getInsurance() - returns (int) employee contribution for insurance coverage.
        Amount of deduction is computed as follows:
        If the employee is under 40 rate is 3% of salary, if the employee is between
        40 and 50 rate is 4% of salary, and if the employee is between 50 and 60
        rate is 5% of salary. If the employee is above 60 the rate is 6% of salary.
        5. getNetPay() -returns (double) the net pay for the employee after deducting
        from salary, the deductions: ss(1), health(3), fed_tax() and insurance.

    Write an appropriate main class with a main() method to create two employee objects,
    and print information.
 
 
 
Expert Comment by anokun7:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by alternation:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by alternation:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by Sham850:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Accepted Solution by alternation:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-46