aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Can the domain objects be shown as class instances in class diagram? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Can the domain objects be shown as class instances in class diagram?" Watch "Can the domain objects be shown as class instances in class diagram?" New topic
Author

Can the domain objects be shown as class instances in class diagram?

Nilessh Ganu
Ranch Hand

Joined: Dec 22, 2009
Posts: 100
Hi,

Lets say I have domain objects like "pomerrian Dog", "Doberman Dog", "Bull Dog".
As it is mandatory to show the domain objects in assignment to be shown in class diagram, I am planning to show them as instances of class "Dog" in my class diagram like a box containing

DogInstance :pomerrian

It does not make sense to show the breeds of dogs represented as sub classes as it is not required to have a different behavior for suD.
Since the suD is expected to be extensible, we can't expect new class added for each new breed.

Thinking on the database side, I am considering to have a single table for "Dog" with a column as "breed".

So, can the domain objects in the assignment be shown as class instances in class diagram?


Nilesh
SCJP SCWCD OCMJEA
Vijaykumar Dixit
Ranch Hand

Joined: Jul 04, 2011
Posts: 32

Sounds a bit confusing. Your original domain model and requirements are the only guide in this case.
Nilessh Ganu
Ranch Hand

Joined: Dec 22, 2009
Posts: 100
Vj Dx wrote:Sounds a bit confusing. Your original domain model and requirements are the only guide in this case.


Vj Dx, thanks for responding.

The domain model in the assignment are shown with some example breed types. More breed types would be added later.
The requirement of suD do not expect different behavior for each of the breed classes. So I don't want to use sub classes for each breed type.
So simply showing the instances of Dog class would suffice.

Since I saw people in the forum suggesting to depict all the domain objects in the class diagram, I am in dilemna to show them as class instances.

Hope I have not confused you further.


Nilessh Ganu
Ranch Hand

Joined: Dec 22, 2009
Posts: 100
I think I am not able to properly simulate my assignment details here...
Reducing it to a single question:

As mentioned number of times in the forum for showing the domain objects in the class diagrams, can I show them as class instances of a generic class if it is really mandatory??



Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30973
    
159

That seems reasonable. It's hard to say for sure.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ana Gari
Greenhorn

Joined: Aug 19, 2011
Posts: 7
Hi
I got the same thought as you, but don't dare to implement. I am in the middle of my assignment
Have you shown Calssname: instancename in your class diagram to mirror the domain model.

Thanks for your response in advance
 
 
subject: Can the domain objects be shown as class instances in class diagram?