forked from CSC207-UofT/course-project-super-turtle-hackers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tony (Juntao) Hu
committed
Dec 5, 2021
1 parent
e4ce4bd
commit f48583b
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.amigo.match; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.amigo.course.CourseSetFactory; | ||
import com.amigo.user.ProfileFactory; | ||
import com.amigo.user.User; | ||
import com.amigo.user.UserFactory; | ||
|
||
public class DemoMatching { | ||
|
||
public static Map<String, List<Match>> doMatching(User user) { | ||
Matcher matcher = new Matcher(); | ||
List<User> users = createDemoUsers(); | ||
users.add(user); | ||
return matcher.match(users); | ||
} | ||
|
||
private static List<User> createDemoUsers() { | ||
ArrayList<User> users = new ArrayList<User>(); | ||
ProfileFactory profileFactory = new ProfileFactory(); | ||
CourseSetFactory courseSetFactory = new CourseSetFactory(); | ||
UserFactory userFactory = new UserFactory(); | ||
var p1 = profileFactory.createProfile("Toni", 2, "Linguistics", courseSetFactory.createCourseSet("CSC207,LIN102,LIN101"), | ||
"", "Chess", "Ice Skating", "Taylor Swift", "Eat Manpuku"); | ||
var p2 = profileFactory.createProfile("Ikshat", 2, "Computer Science", courseSetFactory.createCourseSet("CSC207,CSC301,CSC209"), | ||
"", "Sleep", "Rock Climbing", "Zachary Knowles", "Play Video Games"); | ||
var p3 = profileFactory.createProfile("Rue", 2, "Computer Science", courseSetFactory.createCourseSet("CSC207,CSC236,CSC209"), | ||
"", "Poetry", "Ew Sports", "BTS", "Read"); | ||
var p4 = profileFactory.createProfile("Adrian", 2, "Gender Studies", courseSetFactory.createCourseSet("ECO101,CSC207,MAT237"), | ||
"", "Economics", "Ski", "Illenium", "Breathe"); | ||
var p5 = profileFactory.createProfile("Dien", 2, "Computational Biology and Bioinformatics", courseSetFactory.createCourseSet("CSC207,CSC236,BIO101"), | ||
"", "Makeup", "Dance", "Blackpink", "Makeup Even More"); | ||
var p6 = profileFactory.createProfile("Lawrence", 2, "Chemistry", courseSetFactory.createCourseSet("CHM101,CHM102,CSC207,MAT237"), | ||
"", "Crypto", "Run", "Pop", "Lift Weights"); | ||
|
||
users.add(userFactory.createUser(p1)); | ||
users.add(userFactory.createUser(p2)); | ||
users.add(userFactory.createUser(p3)); | ||
users.add(userFactory.createUser(p4)); | ||
users.add(userFactory.createUser(p5)); | ||
users.add(userFactory.createUser(p6)); | ||
|
||
return users; | ||
} | ||
} |