/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package cafetest; import static cafetest.JobType.SERVER; import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; import java.util.LinkedList; import java.util.Arrays; //import java.io.* /** * * @author jcmtiernan */ public class CafeTest { /** * @param args the command line arguments */ public static void main(String[] args) { Person me; Employee you = new Employee(755,SERVER,86.00,"Su","Ling","sling@gmail.com"); Coffee spucks = new Coffee(); PDay today = new PDay(); PDay weekend = new PDay(27,9,2014,6); PDay oops = new PDay(42,13,1999,9); File infile = new File("cafedata.txt"); Scanner filein; try { filein = new Scanner(infile); System.out.println("Reading datat from "+infile); } catch (FileNotFoundException f) { System.out.println("File does not exist"); filein = new Scanner(System.in); } System.out.println(today.toFullString()); System.out.println(weekend.toFullString()); System.out.println(oops.toFullString()); // get all initial data //menu of actions that the user can choose // 1. seat a party of patrons // 2. get drinks for a party of patrons // 3. take orders from patrons // Ask the user to choose the next action // System.out.println(weekend.toString()); System.out.println(oops); System.out.println( "Today is " + today); /* * * Scanner input = new Scanner(System.in); */ me = new Employee("Ioe", "Schmoe", "schmoe@gmail.com"); System.out.println(me.getFirstName() + me.getLastName() + me.geteMailAddress() + me.getPaymentAmount()); System.out.println(me); System.out.println(you.getFirstName() + you.getLastName() + you.geteMailAddress()); System.out.println(you); System.out.println(spucks); //System.out.println("\nPlease enter a first name"); you.setFirstName(filein.nextLine()); //System.out.println("\nPlease enter a pay rate per hour as a money amount "); you.setPayRate(filein.nextDouble()); filein.nextLine(); //System.out.println("\nPlease enter the name of the new job type "); String temptype = new String(filein.nextLine()); you.setJobType(temptype); System.out.println(you); /* * * */ } }