meta.mp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. input metauml;
  2. beginfig(1);
  3. Class.LittlePraktomat("LittlePraktomat")
  4. ("-tutors: Set<Tutor>",
  5. "-currentTutor: Tutor",
  6. "-students: Set<Student>",
  7. "-tasks: Map<Integer,Task>",
  8. "-nextTaskId: int",
  9. "-solutions: Set<solution>")
  10. ("+addTutor(Tutor): void",
  11. "+addStudent(Student): void",
  12. "+addTask(String): int",
  13. "+containsTutor(Tutor): boolean",
  14. "+containsTask(int): boolean",
  15. "+getCurrentTutor(): Tutor",
  16. "+setCurrentTutor(Tutor): void",
  17. "+getTutors(): Set",
  18. "+getStudents(): Set",
  19. "+getStudentsByStudentNr(int): Student",
  20. "+getTasks(): Map",
  21. "+getSolutionsToTask(): int",
  22. "+getReviewedSolutions(int): int",
  23. "+getDistribution(int): int[]",
  24. "+getStudentsByGrade(): List"
  25. );
  26. classStereotypes.LittlePraktomat("<<AverageGrade>>");
  27. Class.Person("Person")
  28. ("-name: String",
  29. "+REGEX_NAME: String"
  30. )
  31. ("+Person(String): void",
  32. "+getName(): String"
  33. );
  34. Class.Student("Student")
  35. ("-studentNumber: int",
  36. "+REGEX_STUD_NUMBER: String",
  37. "-myTutor: Tutor",
  38. "-solutions: Map<Integer,Solution>",
  39. )
  40. ("+Student(String,int,Tutor): void",
  41. "+getStudentNumber(): int",
  42. "+getTutor(): Tutor",
  43. "+getSolution(): int",
  44. "+submitSolution(Solution): void"
  45. );
  46. classStereotypes.Student("<<Comparable>>", "<<AverageGrade>>");
  47. Class.Review("Review")
  48. ("-grade: int",
  49. "-text: String",
  50. "-solution: Solution"
  51. )
  52. ("+Review(int,String,Solution): void",
  53. "+getGrade(): int",
  54. "+getText(): String",
  55. "+getSolution(): Solution"
  56. );
  57. Class.Solution("Solution")
  58. ("-author: Student",
  59. "-taskID: int",
  60. "-text: String",
  61. "-review: Review"
  62. )
  63. ("+Solution(int,String,Student): void",
  64. "+getText(): String",
  65. "+getTask(): Task",
  66. "+getAuthor(): Student",
  67. "+getReview(): Review",
  68. "+setReview(Review): void"
  69. );
  70. Class.Tutor("Tutor")
  71. ("-students: Set<Student>",
  72. "-missingReviews: Set<Solution>",
  73. "-reviewsDone: Set<Review>"
  74. )
  75. ("+Tutor(String): void",
  76. "+addStudent(Student): void",
  77. "+getStudentCount(): int",
  78. "+review(int,Student,int,String): boolean",
  79. "+addMissingReview(Solution): void",
  80. "+getmissingReviewCount(): int",
  81. "+compareTo(Tutor): int"
  82. );
  83. classStereotypes.Tutor("<<Comparable>>", "<<AverageGrade>>");
  84. Class.Task("Task")
  85. ("-id: int",
  86. "-text: String",
  87. "-solutions: Set<Solution>"
  88. )
  89. ("+Task(int, String): void",
  90. "+addSolution(Solution): void",
  91. "+getText(): String",
  92. "+getId(): int",
  93. "+getSolutions(): Set<Solution>"
  94. );
  95. classStereotypes.Task("<<AverageGrade>>");
  96. topToBottom(20)(Student, Person, Tutor, Task);
  97. topToBottom(30)(LittlePraktomat, Review, Solution);
  98. leftToRight(50)(Student, LittlePraktomat);
  99. drawObjects(Person, LittlePraktomat, Student, Review, Solution, Tutor, Task);
  100. link(inheritance)(pathStepX(Person.n, Student.s, 0));
  101. link(inheritance)(pathStepX(Person.s, Tutor.n, 0));
  102. link(aggregation)(pathStepX(Student.ne + (0, -15), Solution.nw + (0, -19), 20));
  103. link(aggregation)(pathStepX(Student.n, LittlePraktomat.nw + (0, -50), 0));
  104. link(aggregation)(pathStepX(Student.nw + (0, -15), Tutor.nw + (0, -33), -30));
  105. link(aggregation)(pathStepX(Tutor.nw + (0, -7), Student.nw + (0, -55), -15));
  106. link(aggregation)(pathStepX(Tutor.nw + (0, -7), LittlePraktomat.nw + (0, -39), -18));
  107. link(aggregation)(pathStepX(Tutor.nw + (0, -7), LittlePraktomat.nw + (0, -29), -21));
  108. link(aggregation)(pathStepX(Task.nw + (0, -7), LittlePraktomat.nw + (0, -60), -50));
  109. link(aggregation)(pathStepX(Task.ne + (0, -7), Solution.nw + (0, -30), 15));
  110. link(aggregation)(pathStepX(Solution.nw + (0, -7), LittlePraktomat.nw + (0, -82), -23));
  111. link(aggregation)(pathStepX(Solution.nw + (0, -7), Student.ne + (0, -7), -26));
  112. link(aggregation)(pathStepX(Solution.nw + (0, -7), Student.ne + (0, -66), -29));
  113. link(aggregation)(pathStepX(Solution.nw + (0, -7), Tutor.ne + (0, -45), -32));
  114. link(aggregation)(pathStepX(Solution.nw + (0, -59), Task.ne + (0, -50), -20));
  115. link(aggregation)(pathStepX(Solution.ne + (0, -7), Review.ne + (0, -43), 15));
  116. link(aggregation)(pathStepX(Review.ne + (0, -7), Solution.ne + (0, -53), 30));
  117. link(aggregation)(pathStepX(Review.nw + (0, -7), Tutor.ne + (0, -55), -10));
  118. endfig;
  119. end