Help with OO Model
- From: "Marc De Schrijver" <marc.deschryver1@xxxxxxxxxx>
- Date: Fri, 22 Dec 2006 21:19:03 GMT
I'm designing an OO Model for a large application, and I have some question
on how to model a particular situation; it's not directly related to C# but
rather to general OO. The applicaiton will be developed in C# 2.0 though,
which may have some influence on the OO model.
Here's what I'm trying to model:
I have a class Company, a class Publisher, a class Manufacturer and a class
Distributor.
Their relationships are as follows:
1. A Publisher is a Company
2. A Manufacturer is a Company
3. A Distributor is a Company
6. A Company can be just a distributor
4. A Company can be just a publisher or a publisher and distributor at the
same time
5. A Company can be just a manufacturer or a manufacturer and distributor at
the same time
7. A Company can be a publisher, manufacturer and distributor all at the
same time
A Publisher and a Manufacturer are very similar in that they both create a
product; however, I think of the two roles differently and would prefer to
maintain them as different entity types. I would like to see code like
Publisher.Product when I'm dealing with printed material and
Manufacturer.Product when I'm dealing with non-printed material.
On the other hand, given a Product I would like to be able to return its
creator, which could be either a manufacturer or a publisher, depending on
the kind of product.
Any insights or recommendations are greatly appreciated.
-- Hans
.
- Follow-Ups:
- Re: Help with OO Model
- From: Mark Wilden
- Re: Help with OO Model
- From: Bob Jones
- Re: Help with OO Model
- From: Bob Jones
- Re: Help with OO Model
- From: Bob Jones
- Re: Help with OO Model
- From: Joanna Carter [TeamB]
- Re: Help with OO Model
- From: Kevin Spencer
- Re: Help with OO Model
- From: Kevin Spencer
- Re: Help with OO Model
- From: Dave Sexton
- Re: Help with OO Model
- Prev by Date: Re: Memory Limit for Visual Studio 2005???
- Next by Date: Re: Memory Limit for Visual Studio 2005???
- Previous by thread: What is the significance of 0x200 here?
- Next by thread: Re: Help with OO Model
- Index(es):
Relevant Pages
|
Loading