need help

Printable View

• February 9th, 2010, 09:44 PM
james
need help
hey, guys i it's me again please can you help me with this program .But here is the requirements:

Here is a summer programming job for 5 weeks.it pay 15.50 per hour.Suppose that the total tax you pay on your summer job incomes is 14%.After paying the taxes, yoy spend 10% of your net income to buy new clothes and other accesories for the next school year and 1% to buy additional school supplies.After buying clothes and school supplies, you use 25% of the remaining money to buy saving bonds.For each dollar you spend to buy saving bond, your parents spend \$0.50 to buy additional saving bonds for you.Write a program that prompts the user to enter the pay rate for an hour and the number of hours worked each week. The program then outputs the following:

a.)Your income before and after taxes from your summer job
b.)The money you spend on clothes and other accessories
c.)The money you spend on school supplies
d.)The money you spend to buy saving bonds
e.)The money your parents spend to buy additional saving bonds for you

Code :

```import java.util.*; class football {static Scanner console = new Scanner(System.in); public static void main(String[] args) { double wages ; double rate ; double hours; double taxes; double clothesexp; double twagesatax; double schsupply; double sbonds;     System.out.print("Enter hours worked:"); hours = console.nextDouble(); System.out.println();   System.out.print("Enter pay rate:"); rate = console.nextDouble(); System.out.println();     wages = hours * rate;   System.out.println("The wages are :" + wages);   System.out.println(" Total wages before taxes:" + wages );   taxes = 14% * wages; System.out.println(" Total wages after taxes:" + twagesatax );     clothesexp = 10% * twagesatax; System.out.println("Total money spend on clothes and other accessories :" + clothesexp );   schsupply = 1% * (twagesatax + clothesexp); System.out.println("Total money spend on school supplies :" + schsupply );   sbonds = 25% * (twagesatax + clothesexp + schsupply); System.out.println("Total money spend on saving bonds :" + sbonds );             } }```
• February 10th, 2010, 03:03 AM
Shambolic
Re: need help
James, the correct way to put code tags around your code is...

[ code ]
This is my code
[ /code ]

...but without the spaces between the brackets and "code" or "/code".
• February 10th, 2010, 05:19 PM
james
Re: need help
hey shambolic, i need help in correcting and modifing my program.So, please if you could help me with if not don,t tell me about those things you mentioned above coz it has no help to me .
• February 10th, 2010, 06:17 PM
james
Re: need help
:((:((:(Hey guys i have made some changes into my program it has compiled but it only calculates for the wages and the rest it did not do any calculation with them.So, I was hoping that somebody out there viewing could help me out coz Iam so desperate right now.((:((:((:((:((:

Code :

```  import java.util.*; class football { static Scanner console = new Scanner(System.in); public static void main(String[] args) { double wages ; double rate ; double hours; double clothesexp; double twagesatax; double schsupply; double sbonds;     System.out.print("Enter hours worked:"); hours = console.nextDouble(); System.out.println();   System.out.print("Enter pay rate:"); rate = console.nextDouble(); System.out.println();     wages = hours * rate;   System.out.println("The wages are :" + wages);   System.out.println(" Total wages before taxes:" + wages );   twagesatax = 14/100 * wages; System.out.println(" Total wages after taxes:" + twagesatax );     clothesexp = 10/100 * (wages - twagesatax); System.out.println("Total money spend on clothes and other accessories :" + clothesexp );   schsupply = 1/100 * (wages-(twagesatax + clothesexp)); System.out.println("Total money spend on school supplies :" + schsupply );   sbonds = 25/100 * (wages-(twagesatax + clothesexp + schsupply)); System.out.println("Total money spend on saving bonds :" + sbonds );             } }```
• February 11th, 2010, 01:30 AM
jassi
Re: need help
Hi james, This is your complete program. Use it and enjoy...and click on Thanks link plz

Code :

```import java.util.*; class football { static Scanner console = new Scanner(System.in); public static void main(String[] args) { double wages ; double rate ; double hours; double clothesexp; double twagesatax; double schsupply; double sbonds;     System.out.print("Enter hours worked:"); hours = console.nextDouble(); System.out.println();   System.out.print("Enter pay rate:"); rate = console.nextDouble(); System.out.println();     wages = hours * rate;   System.out.println("The wages are :" + wages);   System.out.println(" Total wages before taxes:" + wages );   twagesatax = (float)14/100 * wages; System.out.println(" Total wages after taxes:" + twagesatax );     clothesexp = (float)10/100 * (wages - twagesatax); System.out.println("Total money spend on clothes and other accessories :" + clothesexp );   schsupply = (float)1/100 * (wages-(twagesatax + clothesexp)); System.out.println("Total money spend on school supplies :" + schsupply );   sbonds = (float)25/100 * (wages-(twagesatax + clothesexp + schsupply)); System.out.println("Total money spend on saving bonds :" + sbonds );             } }```