public class PDConsoleApplication { public static void main(String args[]) { // Check to see that there is a command line argument. /* if (args.length == 0) { System.err.println("You must provide the name of the file" + " that contains the phone directory."); System.exit(1); }*/ // Create a PhoneDirectory object. PhoneDirectory phoneDirectory = new ArrayBasedPD(); // Load the phone directory from the file. phoneDirectory.loadData("dataFile.txt"); // Create a PDUserInterface object. PDUserInterface phoneDirectoryInterface = new PDConsoleUI(); // Process user commands. phoneDirectoryInterface.processCommands(phoneDirectory); } }