Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. private void createTerm() {
  2. Random random = new Random();
  3. List<Course> courses = this.catalog.getCourse();
  4. List<Instructor> instructors = this.faculty.getInstructors();
  5. for(int i = 0; i < 21; i++) {
  6. Course course = courses.get(random.nextInt(courses.size()));
  7. Instructor instructor = instructors.get(random.nextInt(instructors.size()));
  8. List<Timeslot> timeslots = new ArrayList<>();
  9. timeslots.add(timeslotsLists.get(random.nextInt(timeslotsLists.size())));
  10. term.addSection(new Traditional(course, instructor, timeslots));
  11. term.addSection(new Hybrid(course, instructor, timeslotsLists.get(random.nextInt(timeslotsLists.size()))));
  12. term.addSection(new Online(course, instructor));
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement