Book a Demo

Author Topic: Link between use case and classes?  (Read 5094 times)

Jara

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Link between use case and classes?
« on: August 29, 2002, 05:45:35 am »
Link between use case and classes?

Is possible in EA (and in UML) create link between use cases and classes?
E.g. I want to say - this use case works with notion "Invoice", which represents
class cInvoice.
In this case, when I change use case "UC1" in use case model,
I can simply identify all others use cases whitch are in relation to
the same classes .

Regards
Jara

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Link between use case and classes?
« Reply #1 on: August 29, 2002, 12:02:09 pm »
Hi, Jara.

To create your links, just use the relationship matrix (Project -> Relationship Matrix).

Once the matrix screen is displayed, specify the root level in your project tree as "Source", and same for Target.

Specify "Use case" for your first Type, and "Class" as your second type. "Dependency" should be the Link type, and probably "Source to target" is the approriate direction.

Once all your use cases and all your classes are displayed in your matrix, right-click on the intersection of the use case and class of your choce, and click on the option to create your association.

Don't forget to click on Profiles, and save your matrix with an appropriate name.

Let me give you a tip, however: I don't use the Use Case vs. Class matrix, because I detail each use case in a Sequence Diagram (and sometimes in a State Chart also). Also, I use the Sequence relationship as the Link Type. This way I don't need to create new relationships: my relationships are automatically displayed according to what I have already done in my sequence diagrams. What I creat this way is a pseudo-CRUD (Create, Read, Update, Delete) matrix, and it is an invaluable tool for completeness analysis of your model.  

Hope it helps.

Jaime Gonzalez

PhilR

  • EA User
  • **
  • Posts: 87
  • Karma: +0/-0
    • View Profile
Re: Link between use case and classes?
« Reply #2 on: August 29, 2002, 08:53:40 pm »
I agree with Jaime's comments especially regarding the 'CRUD' matrix as a powerful tool although I prefer to call this a 'Responsibility' matrix to get away from the database connotations.  

In fact, the matrix can be viewed as a summary of CRC (Class-Responsibility-Collaboration) cards.  Depending on how you arrange the matrix, column headings are Classes, row headings are Use Cases, row contents are Collaborations between Classes which realise a Use Case.  Column contents are the sum of all responsibilities for a Class.

Also I drag Classes directly on to Use Case diagrams and connect them to a use case with an Association.  Users love it as they can see everything on one diagram.  I do a single 'context' diagram with all use cases and actors but no classes and then a diagram for each use cases showing the classes.

As far as I can see this is a legal UML diagram since Classes and Use Cases are both classifiers and can have associations.  If its not legal I don't care since my users love it  ;).

Phil.

Jara

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Link between use case and classes?
« Reply #3 on: August 29, 2002, 11:20:40 pm »
Jaime, Phil: thanks a lot!!

Relationship matrix is great Thing and Your recommendations are very useful.
We make now first project in EA and will see, whitch method is for us the best.

Regards
Jara