-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
74 lines (59 loc) · 2.1 KB
/
Main.java
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package peer_to_peer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;
import peer_to_peer.model.Availability;
import peer_to_peer.model.Student;
import peer_to_peer.textualInterface.StudentInterface;
import peer_to_peer.model.Course;
import peer_to_peer.model.Level;
import peer_to_peer.model.Meeting;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
Level level;
Student students = new Student();
StudentInterface levelMenu = new StudentInterface();
Availability availabilities = new Availability();
Course courses = new Course();
Meeting meetings = new Meeting();
int choice;
do {
System.out.println(" *** Welcome to Peer-To-Peer ***");
System.out.println(" *** Principle Menu ***");
System.out.println("1- Students");
System.out.println("2- Courses");
System.out.println("3- Meeting");
choice = s.nextInt();
switch(choice)
{
case 1:
students.StudentMenu(students);
break;
case 2:
courses.CourseMenu(courses);
break;
case 3:
System.out.println("-The Courses Available: ");
System.out.println("");
courses.displayAllCourses();
System.out.println("Enter the course to find tutors: ");
String title = s.next();
System.out.println("Enter the level to find tutors: ");
level = levelMenu.select_level(students);
/*for(int i = 0; i < meetings.sortBadStudents(title, level).size(); i++) {
Student st= (Student)meetings.sortBadStudents(title, level).get(i);
System.out.print(" id= "+st.getId()+" || first name= "+st.getFirstName());
}
for(int i = 0; i < meetings.sortGoodStudents(title, level).size(); i++) {
Student st= (Student)meetings.sortGoodStudents(title, level).get(i);
System.out.print(" id= "+st.getId()+" || first name= "+st.getFirstName());
} */
meetings.matchingAvailability(meetings.sortBadStudents(title, level), meetings.sortGoodStudents(title, level));
break;
}
}
while(choice != 5);
}
}