|
Multiplicity | Semantic |
0..1 | Zero or 1 |
1 | Exactly 1 |
0..* | Zero or more |
* | Zero or more |
1..* | 1 or more |
1..6 | 1 to 6 |
Name of the Class |
Attributes |
Operations |
ClassName |
Attribute - name1 : data-type1 = default-val1 Attribute - name2 : data-type2 = default-val2 |
Operation-name1(arguments 1): result-type1 Operation-name2(arguments 2): result-type2 |
Sign | Visibility name | Meaning |
+ | Public | The element that can access the class can access all the attributes of that class. |
- | Private | the attribute can be accessed by the function of the same class. |
# | Protected | The attribute can be accessed only by the functions from the same class and children class. |
~ | Package | any element that is in the same package as class or in a nested subpackage can access the attributes. |
|
StudentDetails |
-name: String[2..*] -address: String[3] -emailId: String[0..1] |
|
|