Book a Demo

Author Topic: Beginner Help  (Read 2801 times)

vicki

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Beginner Help
« on: November 03, 2009, 03:46:10 pm »
I am learning UML and have just started with EA and have some questions that I hope you can help with.

1. Doing a class diagram and need to add an operation called findBookings, public method that returns an object of type Bookings with a parameter of Date bookingDate.

No problems with the adding operations, but how do I show a return of "object" of type Bookings?  What return type do I use - there is no 'object'?
Understand how to add a parameter, but not one for Date?  Again, nothing for date.

2. In a sequence diagram I need to show a return message.  How do I get the line to be dotted to show the return?

Hope someone can help.  They are driving me nuts and can't seem to find or ask the right question in the help documents.

Vicki :-/

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Beginner Help
« Reply #1 on: November 03, 2009, 06:41:55 pm »
Vicky,

When you are modelling operations you are actually defining the "signature" of the operation. This means that you define the types of the parameters and returntype (wich is just another parameter).

So you create a class "Bookings" and assing this as the type of your return parameter.

Same thing for the Date, although you might see that as a built-in type like integer or string. In that case you can add type to the "programming language" you have selected through "Settings/Code Datatypes".

As for the return message: just draw a message from right to left and in its properties tick the "IsReturn" tickbox. (I just that and EA already ticked that for me when I drew the message from right to left)

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Beginner Help
« Reply #2 on: November 04, 2009, 08:40:08 am »
Quote
As for the return message: just draw a message from right to left and in its properties tick the "IsReturn" tickbox. (I just that and EA already ticked that for me when I drew the message from right to left)
There is an option that toggles this: Tools > Options > Diagram > Sequence > Assume right to left messages are Return
The Sparx Team
[email protected]

vicki

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Beginner Help
« Reply #3 on: November 04, 2009, 02:56:15 pm »
Thank you both for your help.  Am on my way again to completing my work.

Vicki :)