public static void main(String[] args) { DatabaseUtil.initDB(); // You should not remove this line, it creates the in-memory database PhoneBookImpl phoneBook = new PhoneBookImpl(); /* Initialize list of people from database */ phoneBook.getPeopleFromDb(); System.out.println("Initial phone book (from List)"); System.out.println(phoneBook.toString()); /* TODO: create person objects and put them in the PhoneBook and database * John Smith, (248) 123-4567, 1234 Sand Hill Dr, Royal Oak, MI * Cynthia Smith, (824) 128-8758, 875 Main St, Ann Arbor, MI */ Person p = new Person("John Smith", "(248) 123-4567", "1234 Sand Hill Dr, Royal Oak, MI"); phoneBook.addPerson(p); p = new Person("Cynthia Smith", "(824) 128-8758", "875 Main St, Ann Arbor, MI"); phoneBook.addPerson(p); // TODO: print the phone book out to System.out System.out.println("\nPhone book (from database) after adding John & Cynthia Smith"); System.out.println(phoneBook.toStringFromDb()); // TODO: find Cynthia Smith and print out just her entry Person foundPerson = phoneBook.findPersonFromCache("Cynthia", "Smith"); System.out.println("\nCynthia Smith query result:"); System.out.println(foundPerson.toString()); // TODO: insert the new person objects into the database (and the phonebook member / list!) p = new Person("Jim Harbaugh", "(800) MGO-BLUE", "1 N. Main St, Ann Arbor, MI"); phoneBook.addPerson(p); System.out.println("\nPhone book after adding Jim Harbaugh: "); System.out.println(phoneBook.toStringFromCache()); }