Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2


  1. #1
    Junior Member
    Join Date
    Mar 2011
    Thanked 0 Times in 0 Posts

    Default 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

     * @(#)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
    						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");

  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    United Kingdom
    My Mood
    Thanked 293 Times in 226 Posts
    Blog Entries

    Default 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.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. help needed ,,, please
    By dpes in forum What's Wrong With My Code?
    Replies: 7
    Last Post: October 7th, 2010, 09:03 AM
  2. help needed
    By The Lost Plot in forum Loops & Control Statements
    Replies: 4
    Last Post: March 16th, 2010, 03:55 AM
  3. Array help needed
    By The Lost Plot in forum Collections and Generics
    Replies: 5
    Last Post: March 12th, 2010, 12:22 PM
  4. [SOLVED] Help needed!
    By subhvi in forum Web Frameworks
    Replies: 4
    Last Post: February 18th, 2010, 09:26 AM
  5. [SOLVED] A little help needed..
    By JavaStudent87 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: January 22nd, 2010, 06:54 PM