View Single Post
Old 03-27-2006, 12:27 PM   #8 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,166
Belisarius is on a distinguished road
That's not inheirently a polymorphism problem, but you could turn it into one by saying that there are different types of users.

The simplest way to store the information would be to create an object to store all the properties. For example, create a Person class with variables for the DOB, address, etc. You can then write the object to a file in order to store it and read the file in order to load it back up. A simple way to do this would be to use Serialization.

To showcase ploymorphism, you could create different users, such as, say, an InetPerson, which would contain all the information to contact them online - it would be an extension of the Person object.
__________________
GitS
Belisarius is offline   Reply With Quote