On 24-01-2011 12:14, Jeff Gaines wrote:
> On 24/01/2011 in message <ihk6c2$8ab$(E-Mail Removed)> Jeff
> Johnson wrote:
>> Exactly. If you want to store both a home address and a work address,
>> I think a separate address class is an excellent idea
>
> Building on that you may need to know an address at a certain date so an
> address class with a From and To field may be appropriate, as well as a
> flag to indicate home address, business address, club address etc...
Good point about the historical aspect.
I am not sure that from and to are really attributes
of Address though.
Maybe:
public enum AddressType { HOME, WORK, OTHER }
public class Address
{
public class Location
{
private DateTime from;
private DateTime to;
private AddressType typ;
private Address addr;
public class Customer
{
private IList<Location> loc;
There are many ways to model this.
Arne
|