Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: rhurst on September 26, 2007, 08:20:06 am
-
I used a Use Case diagram to kind of get a feel for the types of class objects I needed for my design. Each Use Case ellipseoid represented a class object. I was told that this was the incorrect use of Use Cases. Is this correct?
-
Whoever advised you is likely on the right track. That is not how use cases and classes are usually portrayed.
This is not a tutorial board. However, take the time to search through and you'll find a few threads (they are usually several pages long) where use cases are discussed. In these threads you will find quite a few good reference sources cited. Take the time to scan the posts, as they will give you some idea of what various users thought about the various references - level of detail, prerequisites, overall clarity, etc.
HTH, David
PS: There are a few basic tutorials on the Resources page of the Sparx Web site.
-
Hmm. I can't confirm that a UC is related to exactly one Class. This is something completely different. The UC tells a short story where an Actor gains a piece of value in performing a set of activities. These will later be supported by one or more classes. However, I'm with David: take the time to read a few books...
-
Actually I have read "The Unified Modeling Language User Guide 2nd edition". On page 230 it states that "A use case describes a system (or a subsystem, class, or interface) does but it does not specify how it does it."
That statement made me assume a Use Case could represent a class.
However, maybe a package is the best way to represent classes?
-
No.
To simplify somewhat...
Use a class element to represent a class. Use other diagrams to represent the relationship of the class to other elements, how a class behaves internally and contributes to system behavior, and the various states the class can be in.
If memory serves (I do not have the document at hand) the quote is slightly different: "...describes what a system (...) does..." [Emphasis added, and omitted word in italics.] It does not state that the use case describes what a class (or whatever) is.
David
-
However, maybe a package is the best way to represent classes?
I think that classes are best represented by classes.
-
Actually I have read "The Unified Modeling Language User Guide 2nd edition". On page 230 it states that "A use case describes a system (or a subsystem, class, or interface) does but it does not specify how it does it."
That statement made me assume a Use Case could represent a class.
However, maybe a package is the best way to represent classes?
From the UML 2.1.1 Structure Specification, Section 16.1:
Strictly speaking, the term “use case” refers to a use case type. An instance of a use case refers to an occurrence of the emergent behavior that conforms to the corresponding use case type. Such instances are often described by interaction specifications.
Apparently, your book does not force you to understand is that a type of emergent behavior can be modeled as a class, although in my experience this is seldom done.
Using a Use Case to model other types of object classes is like saying that swaying in the wind is a type of tree. Your logic is inside out. More proper to explain that a class of Tree exhibits a behavior of swaying in the wind.
I don't understand why you are avoiding use of the class element to represent a class? If you are trying to stay at a high level of abstraction, adorn the class element with the abstract symbol. Your UML fluent readers will better understand your diagrams.