import employees.*;
import util.*;

public class Payroll {	
  public static void main(String[] args) {
    Employee e1, e2, e3;
    String fName;
    String lName;
    int dept;
    double payRate;

    fName = KeyboardReader.getPromptedString("Enter first name: ");
    lName = KeyboardReader.getPromptedString("Enter last name: ");
    dept = KeyboardReader.getPromptedInt("Enter department: ");
    if (dept <= 0) {
      System.out.println("Department must be > 0");
      dept = 0;
    }
    payRate = KeyboardReader.getPromptedDouble("Enter payRate: ");
    if (payRate < 0.0) {
      System.out.println("Pay rate must be >= 0");
      payRate = 0.0;
    }
    e1 = new Employee(fName, lName, dept, payRate);
    System.out.println(e1.getPayInfo());

    fName = KeyboardReader.getPromptedString("Enter first name: ");
    lName = KeyboardReader.getPromptedString("Enter last name: ");
    dept = KeyboardReader.getPromptedInt("Enter department: ");
    if (dept <= 0) {
      System.out.println("Department must be > 0");
      dept = 0;
    }
    payRate = KeyboardReader.getPromptedDouble("Enter pay rate: ");
    if (payRate < 0.0) {
      System.out.println("Pay rate must be >= 0");
      payRate = 0.0;
    }
    e2 = new Employee(fName, lName, dept, payRate);
    System.out.println(e2.getPayInfo());

    fName = KeyboardReader.getPromptedString("Enter first name: ");
    lName = KeyboardReader.getPromptedString("Enter last name: ");
    dept = KeyboardReader.getPromptedInt("Enter department: ");
    if (dept <= 0) {
      System.out.println("Department must be > 0");
      dept = 0;
    }
    payRate = KeyboardReader.getPromptedDouble("Enter pay rate: ");
    if (payRate < 0.0) {
      System.out.println("Pay rate must be >= 0");
      payRate = 0.0;
    }
    e3 = new Employee(fName, lName, dept, payRate);
    System.out.println(e3.getPayInfo());
  }
}