forked from MontiCore/cd4analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyLife.cd
More file actions
27 lines (25 loc) · 673 Bytes
/
MyLife.cd
File metadata and controls
27 lines (25 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* (c) https://github.com/MontiCore/monticore */
// package monticore;
import MyAddress.Address;
import java.lang.String;
import java.util.List;
import java.util.Date;
classdiagram MyLife {
abstract class Person {
int age;
Date birthday;
List<String> nickNames;
}
class PhoneNumber;
package uni {
class Student extends Person {
StudentStatus status;
-> Address [1..*] {ordered};
}
class Grade;
enum StudentStatus { ENROLLED, FINISHED; }
composition uni.Student -> uni.Grade [*];
association phonebook uni.Student [java.lang.String] -> PhoneNumber;
}
association [0..1] Person (parent) <-> (child) Person [*];
}