reduce_slots method
- Student s
Réduit le nombre de places disponibles après affectation d’un étudiant.
Implementation
void reduce_slots(Student s) {
//réduire le nombre de places d'une offre de séjour si on affecté une mobilité à un étudiant
if (remaining_slots > 0) {
remaining_slots--;
// this.available_slots--;
if (s.year > 2) {
m_slots--;
print("SLOT SUCCESSFULLY REMOVED MASTER");
if (m_slots == 0) is_full_m = true;
}
else if (s.year == 2) {
b_slots--;
print("SLOT SUCCESSFULLY REMOVED LICENCE");
if (b_slots == 0) is_full_b = true;
}
}
if (remaining_slots == 0) {
is_full = true;
}
}