• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

UML : any concept of Functional Integrity Constraint ?

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a Merise background, and switched to UML . There are a lot of similarities, but I can find out how Functional Integrity Constrainst are represented in UML !
Simple case :
A Student enrolls on 1 or more Modules per year, so in UML we have :
Student (0..N)<--------->(1..N)Module
The Integrity Constraint : For the same year, a student enrolls ONLY ONCE on a given Module !
How do you express that in a UML class diagram ?

Thanks for you help.
 
Author
Posts: 75
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

UML built-in constraints allow you to express common logical constraints on a UML model. Built-in constraints are just written as one word. In contrast, OCL constraints are defined in a language much like first-order predicate logic. They are written inside braces after the affected element

Built in Constraints are as below :
abstract: Abstract classes are usually written with their names in italics, but you can also use {abstract} if you cannot use italics.
ordered: Normally all associations are considered to be unordered. Adding {ordered} at one end of an association means that the list of related objects is ordered. The ordering rule itself is not written.
bag: Normally all associations are sets, meaning that pair of objects only occurs once. Using {bag} means that the same pair can occur more than once.
query: indicates that an operation only reads data from an instance without modifying the instance.
read only: indicates an attribute has only a getX() operation, no setX().
frozen: indicates that an attribute is set exactly once at instance creation time. Like java "final" keyword.
complete: indicates that the subclasses shown are the only subclasses that will ever be allowed.
hierarchy: indicates that the instances form a Composite Pattern
dag: indicates that the instances form a DAG (directed acyclic graph)


Bhagvan K
http://www.architectcorner.com
 
raphael Bereh
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interresting !
So how would you express the above constraint ?
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic