my dog learned polymorphism
The moose likes OO, Patterns, UML and Refactoring and the fly likes Confused in Class Diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Confused in Class Diagram" Watch "Confused in Class Diagram" New topic

Confused in Class Diagram

Vince Chen

Joined: Sep 11, 2004
Posts: 14
Hi, all:
I have designed/developed several applications before. In the design phase, we need to draw a class diagram for each application.
But I am confused about the content of class diagram a long time.

The questions is :
Does the class diagram only include class and class hierarchy of domain model (eg. Student, Course, Teacher..) or class of domain model, service class (eg. OrderService), dao class (eg. StudentDAO, CourseDAO..) and transfer object (eg. StudentTO, CourseTO)?

Because I find that a class diagram belong to the second mode I metioned above in a book "Sun Certified Enterprise Architect for Java EE Study Guide, Second Edition".

Could anyone gives me some idea?

Thanks a lot.
David Newton

Joined: Sep 29, 2008
Posts: 12617

A class diagram can contain whatever classes you want it to.
Vlad Varnica
Ranch Hand

Joined: Dec 28, 2002
Posts: 40
A class diagram can include as many information as you need.
I think that adding additional information (e.g. Entity, Session etc....) is really important but many modelers consider that the PIM could not include PSM information.
This is for me modelers brain masturbation

The current situation I see is that only Omondo has developped Jee, persistance profiles which allow to add stereotypes and get annotation code from your class diagram.
It means that the public adoption is very low and the PIM PAN PUNG is still winning
I agree. Here's the link:
subject: Confused in Class Diagram
It's not a secret anymore!