This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes SCEA - Domain Modelling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "SCEA - Domain Modelling" Watch "SCEA - Domain Modelling" New topic
Author

SCEA - Domain Modelling

Roger Zacharias
Ranch Hand

Joined: Jul 01, 2003
Posts: 49
Hello SCEAs and SCEAs to-be!
concerning the domain and class model I would like to hear your
opinion.
1. I think if two classes have a 1-1 relationship you can make a
single class out of them by combining their attributes (e.g. Customer
and Address -> you can put the attribute "street" or "city" in the
Customer class). Do you think this is ok?
2. I think classes can only be singular?! Is it possible to name a class e.g. "Articles"???
3. Assume you have only 4 classes in your model: Customer,
Order, OrderPosition and Article. The relationships are as follows: Customer-Order (1,0..*), Order-OrderPosition (1,1..*), OrderPosition-Article (1,1..*).
I wonder in which scenario a (1,1..*)for the OrderPosition-Article-Relationship would be applicable?
What do you think?
Roger


SCEA
Padam Krishna
Ranch Hand

Joined: Jul 24, 2003
Posts: 37
Hi Roger,
Here is what I feel for the points you mentioned
1. Always think in terms of real life objects. Assign only those responsibilites, which are relevant to that particular class. Its always said that when one is not clear with adding an attribute to a class or create a new seperate class. Always go with having a new class.
2. You can offcourse have a clas to hold a collection of similar class. but I am not very clear on this. May be some one might put some clear guideline.
3. This depends on the scenario you are talking about. OrderPosition is meant to hold a specific Article detail, but it can also hold details for collection of Article object.
Thanks.
Nishant Anshul
Ranch Hand

Joined: Sep 10, 2003
Posts: 72
Hi Roger,
i would like to add -
1. Having 1:1 relationship between classes doesn't imply u should merge them. Keep them separate as they can be altered later,aggregated by some other class or simply associated with some other class too.
2. Acceptable convention is to have singular name entities as classes. However, there r authors who have used plurals. So it depends.
3. I think, in all likelihood u will have scenarios like 1 orderposition has at least 1 article contained in it; otherwise the order itself in a broader sense would become void.
Correct me if i didn't get u.


SCEA-I, BCJP<p>IBM (India)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCEA - Domain Modelling