I am a complete beginner to java and have been trying to 'teach myself'sort of thing. A couple of excersises in a book have me a little confused, heres one of them:
Write a program to calculate contributions of an employee. The program should:
prompt for a salary and age, and work out the required contributions from this data.
These two items will be whole numbers, but the contributions calculation may be a floating-point number.
If the employee is aged 50 or over, their taxable income reduces by 10%.
Taxation Rates
The taxation rates and thresholds are the following:
Income/ contributions Calculation
$0 - $6,000 No contributions
$6,001 - $21,600 17% on each $1 over $6000
$21,601 - $52,000 $2,652 plus 30% on each $1 over $21,600
$52,001 - $62,500 $11,772 plus 42% on each $1 over $52,000
$62,501 + $16,182 plus 47% on each $1 over $62,500
Sample Execution
For example, the contributions calculation for an employee with a salary of $54,000 is:
11772 + (2000 * 0.42) = 12612
If this employee was over 50, their taxable income would be $48,600, and the
calculation would then be:
2652 + (27000 * 0.30) = 10752
The program, when run, might look as such:
Enter the employee’s taxable income: 54000
Enter the employee’s age: 52
Their tax payable is $10752.00
If someone could give me the programming language for that just to 'println'(no gui) it would give me a reference to go back to each time.
by: tekchicPosted on 2004-06-22 at 06:51:00ID: 11369047
Hi zorro2250,
Have you tried anything -- written any code yet? Why don't you post some code so we can guide you through some steps?
.: tekchic :.