-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from epam-deik-cooperation/uml-exercise
UML exercise - WEEK 3
- Loading branch information
Showing
10 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>unideb-prog2-parent</artifactId> | ||
<groupId>com.epam.training</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>uml-modelling</artifactId> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
week-3/uml-modelling/src/main/java/com/epam/training/lecturer/Lecturer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.epam.training.lecturer; | ||
|
||
public class Lecturer { | ||
|
||
private String name; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
week-3/uml-modelling/src/main/java/com/epam/training/student/Student.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.epam.training.student; | ||
|
||
import com.epam.training.subject.Subject; | ||
import java.util.Set; | ||
|
||
public class Student { | ||
|
||
private String name; | ||
private Set<Subject> subjects; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Set<Subject> getSubjects() { | ||
return subjects; | ||
} | ||
|
||
public void addSubject(Subject subject) { | ||
this.subjects.add(subject); | ||
} | ||
|
||
public void removeSubject(Subject subject) { | ||
this.subjects.remove(subject); | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
week-3/uml-modelling/src/main/java/com/epam/training/subject/CurriculumSubject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.epam.training.subject; | ||
|
||
public class CurriculumSubject extends Subject { | ||
} |
4 changes: 4 additions & 0 deletions
4
week-3/uml-modelling/src/main/java/com/epam/training/subject/NonCurriculumSubject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.epam.training.subject; | ||
|
||
public class NonCurriculumSubject extends Subject { | ||
} |
43 changes: 43 additions & 0 deletions
43
week-3/uml-modelling/src/main/java/com/epam/training/subject/Subject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.epam.training.subject; | ||
|
||
import com.epam.training.lecturer.Lecturer; | ||
import com.epam.training.student.Student; | ||
import java.util.Set; | ||
|
||
public class Subject { | ||
|
||
private String code; | ||
private String name; | ||
private SubjectType subjectType; | ||
private Set<Student> students; | ||
private Set<Lecturer> lecturers; | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public SubjectType getSubjectType() { | ||
return subjectType; | ||
} | ||
|
||
public Set<Student> getStudents() { | ||
return students; | ||
} | ||
|
||
public Set<Lecturer> getLecturers() { | ||
return lecturers; | ||
} | ||
|
||
public void addNewStudent(Student student) { | ||
this.students.add(student); | ||
} | ||
|
||
public void addNewLecturer(Lecturer lecturer) { | ||
this.lecturers.add(lecturer); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
week-3/uml-modelling/src/main/java/com/epam/training/subject/SubjectType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.epam.training.subject; | ||
|
||
public enum SubjectType { | ||
|
||
THEORETICAL, | ||
PRACTICAL, | ||
LABORATORY | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.