import javax.swing.JOptionPane; import java.util.Scanner; import java.io.PrintWriter; import java.io.FileNotFoundException; import java.io.File; /** * Short description of program. * * @author Last Name, First Name * ICS 211 Assignment 25 * Today's Date */ public class LastnameFirstname25{ /** * The "main" method starts the program * * @param args Takes 2 file names as the commandline input. The first file name (args[0]) is the input file. The second file name (args[1]) is the output file. */ public static void main(String[] args) { //your error checking code for args[] goes here try{ MyQueue queue = readFileAddToQueue(args[0]); queue = displayMenu(queue); writeQueueToFile(args[1], queue); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } }// end of main //Javadocs go here public static MyQueue readFileAddToQueue(String input) throws FileNotFoundException{ MyQueue queue = new MyQueue(); //your code goes here return queue; } //Javadocs go here public static void writeQueueToFile(String filename, MyQueue queue){ //your code goes here } //Javadocs go here public static MyQueue displayMenu(MyQueue queue){ //your code goes here return queue; } }//end of class LastnameFirstname25 //Javadocs go here class MyQueue> extends PriorityQueue{ //you can omit the constructor //toString() method that calls the heap's toString() method }//end of class MyQueue //Javadocs go here class Patient implements java.lang.Comparable{ //data fields for the name and priority //Constructor //method getName() //method getPriority() //method toString() /** * Compare two patients based on priority * * @param patient2 is the second patient being compared * @return if priorities are equal, returns 0; if patient1's priority is greater than patient2's priority, returns a positive number; if patient1's priority is lesser than patient2's priority, returns a negative number */ public int compareTo(Patient patient2){ return 0; } }//end of class Patient