Exercise - File I/O
due:Oct. 18, start of class
Extend your previous exercise application AddressBookApplication. so that it creates a new method void init(String filename) which reads in data from the specified file to initialize the collection of AddressEntry elements stored in the AddressBookApplication. This exercise can help you with Project 1 (please see Project 1 requirements to maximize the correlation).
Modify your AddressBookApplication so that its main method invokes its init(filename) with this file. Note that there is NO assummed size to the file. It could contain 0 to MANY addresses and you should read and parse the data until the end of file. Also, the main method of AddressBookApplication after calling init(filename) should call the AddressBook's list() method you created in previous exersise so you can see the newly created AddressEntry objects info.
IMPORTANT:: Use a constructor for AddressEntry that takes all of the read in data from an address to create an instance if you have not already created one.
Deliverables
Demonstrate to fellow class mate and sign the sheet ---if you did not succeed this is your SAFTEY check to get help from instructor or make appointment if no time in class if you could not complete --you WILL be required to do this for your project. Note: I won't give you points back --ideally you come and see me for help before the exercise is due.
|