# HELP NEEDED

• March 4th, 2011, 08:52 AM
nicola177
HELP NEEDED
Hi there, iam a IT student but I cant get my head around java programming. There is this one question that i need help on, Please help me were to go.

A supervisor is getting in a muddle with his staffs wages, he has 4 members of staff, but at 2 different pay scales. There is one team leader (Bob) who is on £8 per hour and £12 for any hours that he has done over 36 hours. The rest are general staff (Jane, Tom and Claire) who get paid £5.75 per hour, and £9.25 for any hours that they have worked over 36 hours. The team leader will also get a £1 per hour bonus for all hours worked if (and only if) he works over 50 hours. General staff will receive a set £20 bonus if (and only if) they work over 50 hours. All staff are taxed at 23%. The supervisor wants to enter each workers total hours for the week just once each, the output must show by name how much they have earned as basic, how much earned as overtime, total bonus, total gross wages and total net wages.

Thank you :)

Code Java:

```/** * @(#)program2again.java * * * @Nicola Evans * @version 1.00 2010/10/4 */     import java.util.Scanner;   class program2again { public static void main (String []args) {   Scanner input = new Scanner (System.in);   String name;     int hours = 0; int overhours;     int tax = 23; String employee; double pay; String postion=("");   String programclose =("No");// needs to be yes before the program can start DONT FORGET TO DECLARE IT BEFORE RUNNING     while (!(programclose.equalsIgnoreCase ("Yes"))) // yes this program will work, if it is no it will end   { System.out.println("Type a employee name to start"); employee= input.next();   System.out.println("Is " + employee +" a team leader, or a general worker?"); postion = input.next();   System.out.println("How many hours has " + employee +" worked "); hours = input.nextInt();   if ( employee.equalsIgnoreCase ("general")) {     if (hours >50) (hours - 50   if ((hours-50) && (hours>=50))   pay = (hours*9.25);   pay = (hours*generalover); // if "hours" > 50 then pay the thingy } else { pay = (hours*leader);       System.out.println("The wages for " + employee +" £" + pay); postion = input.next();     }   //Closing program in this section   System.out.println("Have you finished with the program? Yes or no?"); programclose= input.next();   } //This part is to close the program politly if (programclose.equalsIgnoreCase ("NO")) { System.out.println("Thank you for using this program"); }   } }```
• March 4th, 2011, 10:17 AM
JavaPF
Re: HELP NEEDED
Hello nicola177, welcome to the Java Programming Forums.

Don't worry, everyone has to start somewhere. The more you practise, the more you will learn!

Thank you for posting the code you have written so far.
Please let us know what you are stuck on so we can take it one step at a time.