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