The Artima Developer Community
Sponsored Link

Java Answers Forum
Need Some Coding Help w/ program!

1 reply on 1 page. Most recent reply: Sep 7, 2005 8:09 AM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Coleman Fredericks

Posts: 1
Nickname: colecane
Registered: Sep, 2005

Need Some Coding Help w/ program! Posted: Sep 7, 2005 7:57 AM
Reply to this message Reply
Advertisement
I am a beginner programmer and found this fairly easy program but im so new to java that i cant figure the coding out. If anybody could help this would be awesome! I would even pay someone to code this for me and put it into file. Thanks, cole.


Write a program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking the following deductions:

Federal Income Tax: 15%
State Tax: 3.5%
Social Security Tax: 5.75%
Medicare/Medicaid Tax: 2.75%
Pension Plan: 5%
Health Insurance: $75.00

Your program should prompt the user to input the employee name and the gross amount. The out put will be stored in a file. Format your output to two decimal places. A sample output follows.

Allison Nields
Gross Amount: $3575.00
Federal Tax: $536.25
State Tax: $125.13
Social Security Tax: $205.56
Medicare/Medicaid Tax: $98.31
Pension Plan: $178.75
Health Insurance: $75.00
Net Pay: $2356.00


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Need Some Coding Help w/ program! Posted: Sep 7, 2005 8:09 AM
Reply to this message Reply
Here's a kick start:

public class Income{
   private final double FEDERAL = 0.15;
   private final double STATE = 0.035;
   private final double SOCIAL_SECURITY = 0.0575;
   //  etc...
   
   
   public double calculate_income(double raw_val){
      return (raw_val- getFederal(raw_val) - getState(raw_val));//  etc...
   }
   
   public double getFederal(double val){
      return val * FEDERAL;
   }
   
   public double getState(double val){
      return val * STATE;
   }
   
   //  etc...
}

You can fill in the rest yourself...

Flat View: This topic has 1 reply on 1 page
Topic: J2ee and weblogic8.1 Previous Topic   Next Topic Topic: VERY new to Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use