3.2.5 Java OOPs - FileIO

Before you begin, look at the Java: Text file - Input and Java Text file Output notes and sample code.  You job will to create a class that will contain the basics of these two examples to allow the user to read and write the data from a text file.

After you have created this class, on the workbench you should be able to:
  • create a userList on the work bench or by reading from a file
  • add any number of users to a userList
  • write the userlist to a file

FileIO

HAS-A
no instance variables currently required.

RESPONDS-TO
The constructor is empty

readList(String fileName; UserList ulist)
this method will read from fileName and add the user to the ulist

writeList(String fileName;UserList ulist) 
for each user in the ulist, this method will write the userData to the file fileName

Comments