Java

Moderators: zibadian
Number of threads: 7818
Number of posts: 18218

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
methods-mt Posted by martinpl on 9 Mar 2007 at 5:53 AM
hi programmers could you please read this and generate code for me

"The tax Advantage Company provides free tax services to residents who cannot calculate their personal taxes or pay for calculation by a public tax service.You have been asked to write JAVA program that will calculate on estimated tax for either a single or Married taxpayer,given a keyboard income entry.After the income is entered,a code status S for single or Mfor married is entered.
The necessary classes are a Tax class with a Main() method for keyboard entry of Income and code status value and a Taxreturn class to calculate the tax based on the Input. The Input value should be passed from the Tax class to the Taxreturn class through the Instantiation of a TaxReturn object.The instantiation could take a form such as TaxReturn a TaxReturn= new TaxReturn (income,status)
For Tax payers,two tax rates are needed,15% and 30%
For single Taxpayer the cutoff rate of 15% is $10,000 and 30% above $10,000.
For Married payers the cutoff rate is 15% for amount below $20,000 and 30% for amount of $20,000 and above."
you can even post the code to lyubamt@yahoo.com

Report
Re: methods-mt Posted by zibadian on 9 Mar 2007 at 12:36 PM
This message was edited by zibadian at 2007-3-9 12:36:43

: hi programmers could you please read this and generate code for me
:
: "The tax Advantage Company provides free tax services to residents who cannot calculate their personal taxes or pay for calculation by a public tax service.You have been asked to write JAVA program that will calculate on estimated tax for either a single or Married taxpayer,given a keyboard income entry.After the income is entered,a code status S for single or Mfor married is entered.
: The necessary classes are a Tax class with a Main() method for keyboard entry of Income and code status value and a Taxreturn class to calculate the tax based on the Input. The Input value should be passed from the Tax class to the Taxreturn class through the Instantiation of a TaxReturn object.The instantiation could take a form such as TaxReturn a TaxReturn= new TaxReturn (income,status)
: For Tax payers,two tax rates are needed,15% and 30%
: For single Taxpayer the cutoff rate of 15% is $10,000 and 30% above $10,000.
: For Married payers the cutoff rate is 15% for amount below $20,000 and 30% for amount of $20,000 and above."
: you can even post the code to lyubamt@yahoo.com
:
:
Here is the taxReturn() function:
  double taxReturn(double income, int status) {
    double rate = 0.15;
    if ((status == 0) && (income > 10000)) || ((status == 1) && (income > 20000)) 
      rate = 0.30;
    return income*rate;
  }

The rest is up to you.
Report
Re: methods-mt Posted by martinpl on 15 Mar 2007 at 11:04 PM
yah thanks friends i have managed to complete the rest part of my problem .




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.