Question: in java Extend your previous exercise application AddressBookApplication. so that contains an instance of a class AddressBook. The AddressBook class holds a collection of objects

in java

Extend your previous exercise application AddressBookApplication. so that contains an instance of a class AddressBook. The AddressBook class holds a collection of objects of the class AddressEntry. An AddressEntry represent a single contact in your AddressBook. Look at the requirements of Project 1 (as this exercise can help you with this). Think forward to the requirements of Project 1 to consider what kind of data structure you might used for your collection of AddressEntry objects so that you efficiently - load from file, list in alphabetic order, search/find, add and remove.

Note: this work can help you with your Project 1 requirements.

  • In the main method of AddressBookApplication you are to create an instance of AddressBook (call it ab).
  • NEXT, you are to create a method in your AddressBookApplication called void initAddressBookExercise(ab) that creates 2 instances of AddressEntry and places them in ab (an AddressBook) collection called AddressEntryList. NEXT, the initAddressBookExercise method it calls the AddressBook's ab.list() method.
  • NOTE: The AddressBook's list() method cycles through the collection of AddresEntry objects using an iterator the contained in AddressBook and print outs the information to the console window calling toString() methods on each of its AddressEntry objects.
  • Note: AddressEntry class must have a String toString() method that takes all of its data elements and composes a nicely formated string from its values and returns this string. Again refer to Project 1.

in java Extend your previous exercise application AddressBookApplication. so that contains an

AdressEntry AddressBookApplicaiton AddressBook address EntryList: AdressEntry firstName: String lastName: String street: String city: String state: String zip : Integer phone : String email: String maino Il create instance of AddressBook // called addressBook and then call // initAddressBookExercise(addressBook) initAddressBookExercise (ab) //will first create 2 Ilinstance of Address Entry AND then add them to I ab using the add method. NEXT, it will call listo // iterate through address EntryList and for //each item call to String & print it out add(addressEntry) // add new Il Address Entry // object to the // address Entry List Ll ab.listo; Address Entryo Address Entry(firstName,lastName,street, state,zip,phone,email) toStringo: String Menu setFirstName(firstName: String) getLastNameo: String getFirstNameo: String setLastName(lastName : String): String setCity(city: String) getCityo: String setState(state : String) getStateo: String setStreet(street: String) getStreeto : String FINISH ALL THE REST OF THE set and get* methods /Various Prompt Methods

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!