Checkpoint: added performExchange

This commit is contained in:
2021-01-12 14:10:48 +01:00
parent 1c12a778af
commit bc8f7407fc
4 changed files with 99 additions and 40 deletions

View File

@ -10,7 +10,7 @@ import javax.persistence.ManyToOne;
/**
* Entity of Assignment grouping of state associated about group_id and
* commision_id
*
*
*/
@Entity
@ -28,7 +28,7 @@ public class Assignment {
/**
* Assignment
*
*
* @param group group we would like to assign
* @param commision commision that assignment belongs to
* @param isPastAssignment is assignment past or no
@ -40,14 +40,14 @@ public class Assignment {
/**
* If it returns trues it mesans u are assigned to group accepted by algorythm
*
*
* @return boolean isAccepted
*/
public boolean isAccepted() {
return this.group.getRegisteredStudents().contains(this.commision.getCommisionOwner());
}
/**
/**
* Getter of commision
* @return Commision Commision of given assignments
*/
@ -57,7 +57,7 @@ public class Assignment {
/**
* Assignment
*
*
* @param group group we would like to assign
* @param commision commision that assignment belongs to
*/
@ -68,9 +68,12 @@ public class Assignment {
public Assignment() {
}
public void setCommision(Commision commision) {
this.commision = commision;
}
/**
* Id getter
*
*
* @return id id of assignment
*/
@ -80,7 +83,7 @@ public class Assignment {
/**
* getGroup
*
*
* @return group
*/
public Groups getGroup() {
@ -89,7 +92,7 @@ public class Assignment {
/**
* isPastAssignment getter
*
*
* @return isPastAssignment
*/
public boolean isPastAssignment() {
@ -98,10 +101,10 @@ public class Assignment {
/**
* setter isPastAssignment
*
*
* @param isPastAssignment is assignment past or not
*/
public void setPastAssignment(boolean isPastAssignment) {
this.isPastAssignment = isPastAssignment;
}
}
}