1 / 26

UML for Domain Models

(Reference: Jason Roff – UML Beginner’s Guide). UML for Domain Models. Box Top section is class name Second section is class attributes (data members) Third section is class member functions Notation + public access - private access # protected access. Classes.

chloe
Télécharger la présentation

UML for Domain Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. (Reference: Jason Roff – UML Beginner’s Guide) UML for Domain Models

  2. Box • Top section is class name • Second section is class attributes (data members) • Third section is class member functions • Notation • + public access • - private access • # protected access Classes

  3. A UML Class Diagram for Course Course -enrollmentLimit -nEnrolledStudents -startTime -endTime -instructor +getInstructor() +getStartTime() +getDuration()

  4. Attribute Format -enrollmentLimit:Integer = 20 -nEnrolledStudents: Integer=0 -startTime: Date -endTime: Date -instructor: String -meetingDays[1..7]: Integer -/meetingHoursWeek:float

  5. Show relationships with line and association name. Class Relationships teaches > Professor Course takes > Student

  6. Multiplicity teaches > Professor Course 1 1..* Professors teach 1 or more courses. Courses have exactly one professor.

  7. Roles teaches > Instructor Professor Course 1 1..* 0..* Teaching Assistant Graduate Student grades > 0..*

  8. Objects are differentiated from class with an underline and a class name qualifier Class Instances (OBJECTS) Course:Cs350 -enrollmentLimit = 20 -nEnrolledStudents = 24 -startTime : 14:00 -endTime: 14:50 -instructor: Ribler

  9. Empty arrow points to base class (superclass) from derived class (subclass) Inheritance (Empty Arrow) Person Student Tutor Professor Teaching Assistant

  10. Composition and Aggregation Car Class List Class Engine Class Sprite Class Composition is expressed with a filled diamond. Aggregation is expressed with a unfilled diamond.

  11. Model workflows for use-cases (analysis) Model object behavior (design) Activity Diagrams

  12. Symbols Start Symbol End Symbol Activity Symbol (contains action name) Name of Action Decision Points

  13. GuArds With Decision Point [new file] [file already exists] Create File Update File

  14. Guard without Decision Point Record Data [new file] [file already exists] Create File Update File

  15. Indicators that an action has taken place Events and Triggers Print File Print(File, Printer) SaveAs(Filename) Ready Save File CreateNew(Filename) Create New File

  16. Show concurrency Forks Login Load Grades Load Classes

  17. JOins Load Grades Load Classes Display Data

  18. Swim Lanes POS System Telephone Operator Database Wrapper Purchase() Display Error Display Error Determine Type Load Inventory Store Inventory Change Inventory [failure] [failure]

  19. Model interaction between active objects • Consist of two components • Active objects • Interactions between active objects Sequence DIagrams SpaceShip Shoot

  20. “LiFElines” Indicate Active Objects SpaceShip UFO Shoot X X indicates the end of the objects life.

  21. Conditions Can be Placed on Messages Indicate Active Objects SpaceShip UFO [UFO in Range] Issue Warning

  22. Synchronous – Flow is suspended until return from the call. (filled arrow head) Return – Synchronous message is no longer blocked. Asynchronous – Non-blocking message. Sender doesn’t wait for reply. Flat – synchronization is unspecidfied. Message Arrows

  23. Creating and Destroying Objects SpaceShip Missile <<create>> <<destroys>> X

  24. Sequence Diagrams use Rounded Rectangles to indicate State SpaceShip UFO [UFO in Range] Issue Warning Under Threat Surrender Taken Prisoner Imprisoned

  25. Branching SpaceShip UFO Asteroid [at peace] shoot [in alien war] shoot

  26. Users can be drawn As Stick Figures ATM Login Logged in Prompt for transaction type

More Related