Skip to content

Commit

Permalink
Merge pull request #15 from epam-deik-cooperation/uml-exercise
Browse files Browse the repository at this point in the history
UML exercise - WEEK 3
  • Loading branch information
z-kalmar authored Oct 1, 2020
2 parents 31e9466 + 984c98e commit a171d8b
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ Mi a különbség Java-ban a Class, Abstract Class és az Interface között? Eg

## Harmadik hét

### UML modelling
1. Modellezd le a Neptun tárgyfelvételéhez szükséges objektumokat (tárgy, hallgató, oktató) UML diagram segítségével.
2. Implementáld a létrehozott diagramot egy tetszőleges nyelven.

## Negyedik hét

### Order of everything
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<module>week-2/in-memory-db</module>
<module>week-2/examples</module>
<module>week-2/interfaces</module>
<module>week-3/uml-modelling</module>
<module>week-4/order-of-everything</module>
<module>week-4/custom-map-implementation</module>
<module>week-4/integer-collection</module>
Expand Down
14 changes: 14 additions & 0 deletions week-3/uml-modelling/pom.xml
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>
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;
}

}
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);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.epam.training.subject;

public class CurriculumSubject extends Subject {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.epam.training.subject;

public class NonCurriculumSubject extends Subject {
}
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);
}

}
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.

0 comments on commit a171d8b

Please sign in to comment.