D
dwok
Hi All,
I have a question that could be viewed as more of a general object
oriented question but I still thought this the best place to post it.
I am developing a contact management application that makes use of
several custom classes such as "Contact, Phone_Number, eMail, Address".
I want to assign a Phone Number Type (Fax, Home, Cellular, etc..) to
each instance of the Phone_Number class. What I am not sure of is
whether I should use an enumeration within the "Phone_Number" class to
represent the various "types" of phone numbers or should I create a
separate class to represent the various "types" of phone numbers? When
I designed the database for my application I created a separate table
to hold the various "types" of phone numbers. I did this so I could add
new "phone number types" in the future.
Am I "over emphasizing object oriented design" if I create a separate
class for "phone number types"? Would it be best to use an enumeration
and then update the code if I needed to add another "phone type" in the
future?
Could anyone recommend a good book or reference that would cover
these aspects of object oriented design? Thanks!
- dwok
I have a question that could be viewed as more of a general object
oriented question but I still thought this the best place to post it.
I am developing a contact management application that makes use of
several custom classes such as "Contact, Phone_Number, eMail, Address".
I want to assign a Phone Number Type (Fax, Home, Cellular, etc..) to
each instance of the Phone_Number class. What I am not sure of is
whether I should use an enumeration within the "Phone_Number" class to
represent the various "types" of phone numbers or should I create a
separate class to represent the various "types" of phone numbers? When
I designed the database for my application I created a separate table
to hold the various "types" of phone numbers. I did this so I could add
new "phone number types" in the future.
Am I "over emphasizing object oriented design" if I create a separate
class for "phone number types"? Would it be best to use an enumeration
and then update the code if I needed to add another "phone type" in the
future?
Could anyone recommend a good book or reference that would cover
these aspects of object oriented design? Thanks!
- dwok