import java.io.File; import java.util.Scanner; import java.util.LinkedList; import java.util.PriorityQueue; // For Renewals public class MVD { public static void main(String[] args) { if (args.length != 1) { System.out.println("Syntax: java MVD datafile.txt"); System.exit(0); } try { File file = new File(args[0]); Scanner in = new Scanner(file); in.nextLine(); // Skip over example line char transaction, payment; int time; String name; LinkedList signin = new LinkedList(); while (in.hasNext()) { // This populates the main queue completely, which has a 'time' field which simulates various timed entries. transaction = (char)in.next().charAt(0); payment = (char)in.next().charAt(0); time = Integer.parseInt(in.next()); name = in.nextLine().trim(); Person signedin = new Person(transaction, payment, time, name); signin.add(signedin); } // Then from here, populate each queue and pretend-wait. } catch (Exception e) { e.printStackTrace(); } } } public class Person { private char transaction; private char payment; private int time; private String name; public Person(char trans, char pay, int timeEntered, String personName) { transaction = trans; payment = pay; time = timeEntered; name = personName; } }