× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 10/26/07, Joel Cochran <joelcochran@xxxxxxxxx> wrote:

Each class then implements its own business rules within the construct of
the common Interface. This is a poor example, as I doubt the business rules
would be different based on the type of address...


I just wanted to clarify that I was assuming different types of address
within the same construct (so a home or business address in the US would
share the same rules). I didn't want to confuse anyone because I realized
that later I said:

Etc. etc. And of course, the business rules implemented could be based on
the type (again exposed by the Enumeration), so that a Canadian mailing
address might have different rules than a US address.


Seems like I was contradicting myself, but I didn't mean to. This could be
a valid reason to have an IAddress interface implemented both by USAddress
and CanadianAddress classes, each with distinct rules. Then within that
framework, the rules are likely to be the same for home, business, etc.

So the corrected tree might look like this:

CustomerObject:
- has a Collection of IAddressable objects
*may have any combination of*
- USAddress - implements IAddressable
- CanadianAddress - implements IAddressable
- APOAddress - implements IAddressable
- has a Collection of IPhonable objects
*may have any combination of*
- USPhone - implements IPhonable
- InternationalPhone - implements IPhonable

Then each instance describes itself as to function (home, business, cell,
etc.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.