You are on page 1of 6

package de.tum.in.ase.

pse;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class PrivateTutorGroupMeeting {

private String address;


private TimeSlot timeSlot;
private TutorGroup tutorGroup;
private Skill skillToPractice;

public PrivateTutorGroupMeeting(TimeSlot timeSlot, TutorGroup tutorGroup, Skill


skillToPractice, String address) {
this.timeSlot = timeSlot;
this.tutorGroup = tutorGroup;
this.skillToPractice = skillToPractice;
this.address = address;
}

public TutorGroup getTutorGroup() {


return tutorGroup;
}

public Skill getSkillToPractice() {


return skillToPractice;
}

public TimeSlot getTimeSlot() {


return timeSlot;
}

public String getAddress() {


return address;
}

public void practice() {


Student tutor = getTutorGroup().getTutor();

tutor.say("Welcome to the private tutor meeting");


tutor.say("Thank you for coming today to " + address + ".");
tutor.say("Please don't forget to wash your hands.");

tutor.say("We start with the homework presentation");


List<Student> homeworkPresentationCandidates = new
ArrayList<>(getTutorGroup().getStudents());
Random rand = new Random();

int numberOfHomeworkPresentations = 3;

for (int i = 0; i < numberOfHomeworkPresentations; i++) {


if (homeworkPresentationCandidates.isEmpty()) {
break;
}
int randomIndex = rand.nextInt(homeworkPresentationCandidates.size());
Student randomStudent =
homeworkPresentationCandidates.get(randomIndex);
randomStudent.presentHomework();
homeworkPresentationCandidates.remove(randomIndex);

tutor.say("Next is the group work");

Skill skill = getSkillToPractice();


skill.apply();
for (Student student : getTutorGroup().getStudents()) {
student.learnSkill(skill);
}

tutor.say("Let's have a look at the new homework");

tutor.say("Thank you that you have participated today.");


tutor.say("See you next time at " + address + "!");
}

package de.tum.in.ase.pse;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class VirtualTutorGroupMeeting {

private TimeSlot timeSlot;


private TutorGroup tutorGroup;
private Skill skillToPractice;
private URL url;

public VirtualTutorGroupMeeting(TimeSlot timeSlot, TutorGroup tutorGroup, Skill


skillToPractice, URL url) {
this.timeSlot = timeSlot;
this.tutorGroup = tutorGroup;
this.skillToPractice = skillToPractice;
this.url = url;
}

public TutorGroup getTutorGroup() {


return tutorGroup;
}

public Skill getSkillToPractice() {


return skillToPractice;
}

public TimeSlot getTimeSlot() {


return timeSlot;
}

public URL getUrl() {


return url;
}

public void practice() {


Student tutor = getTutorGroup().getTutor();

tutor.say("Welcome to the virtual tutor meeting");


tutor.say("Thank you for joining using " + url.toString() + " today.");
tutor.say("Please turn on your cameras");

tutor.say("We start with the homework presentation");

List<Student> homeworkPresentationCandidates = new


ArrayList<>(getTutorGroup().getStudents());
Random rand = new Random();

int numberOfHomeworkPresentations = 3;

for (int i = 0; i < numberOfHomeworkPresentations; i++) {


if (homeworkPresentationCandidates.isEmpty()) {
break;
}
int randomIndex = rand.nextInt(homeworkPresentationCandidates.size());
Student randomStudent =
homeworkPresentationCandidates.get(randomIndex);
randomStudent.presentHomework();
homeworkPresentationCandidates.remove(randomIndex);
}

tutor.say("Next is the group work");


Skill skill = getSkillToPractice();
skill.apply();
for (Student student : getTutorGroup().getStudents()) {
student.learnSkill(skill);
}

tutor.say("Let's have a look at the new homework");

tutor.say("Thank you that you have participated using the " + url + " today.");
tutor.say("Goodbye");
}
}

package de.tum.in.ase.pse;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class PhysicalTutorGroupMeeting {

private String room;


private TimeSlot timeSlot;
private TutorGroup tutorGroup;
private Skill skillToPractice;

public PhysicalTutorGroupMeeting(TimeSlot timeSlot, TutorGroup tutorGroup,


Skill skillToPractice, String room) {
this.timeSlot = timeSlot;
this.tutorGroup = tutorGroup;
this.skillToPractice = skillToPractice;
this.room = room;
}

public TutorGroup getTutorGroup() {


return tutorGroup;
}

public Skill getSkillToPractice() {


return skillToPractice;
}

public TimeSlot getTimeSlot() {


return timeSlot;
}

public String getRoom() {


return room;
}

public void practice() {


Student tutor = getTutorGroup().getTutor();

tutor.say("Welcome to the physical tutor meeting");


tutor.say("Thank you for coming to " + room + " today.");

tutor.say("We start with the homework presentation");

List<Student> homeworkPresentationCandidates = new


ArrayList<>(getTutorGroup().getStudents());
Random rand = new Random();

int numberOfHomeworkPresentations = 3;

for (int i = 0; i < numberOfHomeworkPresentations; i++) {


if (homeworkPresentationCandidates.isEmpty()) {
break;
}
int randomIndex = rand.nextInt(homeworkPresentationCandidates.size());
Student randomStudent =
homeworkPresentationCandidates.get(randomIndex);
randomStudent.presentHomework();
homeworkPresentationCandidates.remove(randomIndex);
}

/* for (Student student : homeworkPresentationCandidates) {


student.presentHomework();
}*/

tutor.say("Next is the group work");

Skill skill = getSkillToPractice();


skill.apply();
for (Student student : getTutorGroup().getStudents()) {
student.learnSkill(skill);
}

tutor.say("Let's have a look at the new homework");


tutor.say("Thank you that you have participated in " + room + " today.");
tutor.say("See you next time!");
}

You might also like