how to store details from file in an object
Posted on 2006-10-19
I have data in a file that I want to store in some kind of object. This file contains lines of data (name, age, gender) like so:
angela 30 female
mike 45 male
danny 20 male
sharon 27 female
What is the best way to store this data, in my view there are two possible options:
1. A list of objects where one line corresponds to one object.
2. One object where which keeps seperate Lists for each field in the file.
What are your thoughts?