-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathClassroomConfig.java
More file actions
45 lines (32 loc) · 1.32 KB
/
ClassroomConfig.java
File metadata and controls
45 lines (32 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.classroom;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
@Configuration
public class ClassroomConfig {
@Bean(name = "currentCohort")
public Classroom currentCohort(){
List<Instructor> instructors = new ArrayList<>();
List<Student> students = new ArrayList<>();
instructors.add(new Instructor(100l, "Zan"));
instructors.add(new Instructor(101l, "Brian"));
students.add(new Student(1l, "Cedric"));
students.add(new Student(2l, "Lolu"));
students.add(new Student(3l, "Apoorva"));
students.add(new Student(4l, "Stephen"));
return new Classroom(instructors, students);
}
@Bean(name = "previousCohort")
public Classroom previousCohort(){
List<Instructor> instructors = new ArrayList<>();
List<Student> students = new ArrayList<>();
instructors.add(new Instructor(102l, "Kaleb"));
instructors.add(new Instructor(103l, "Tutor"));
students.add(new Student(5l, "Charu"));
students.add(new Student(6l, "Robert"));
students.add(new Student(7l, "user iphone 83"));
students.add(new Student(8l, "Jessica"));
return new Classroom(instructors, students);
}
}