package general;

public class Compatibility {
	
	public boolean checkCourses(String course, Tutor tutor) {
		for (int i = 0; i < tutor.coursesSize(); i++) {
			if (tutor.getCourse(i).equals(course))
				return true;
		}
		return false;
	}
	
	public boolean checkTimes(Tutee tutee, Tutor tutor) {
		for (int i = 0; i < tutee.timesSize(); i++) {
			for (int j = 0; j < tutor.timesSize(); j++) {
				if (tutor.getTime(j) == (tutee.getTime(i)))
					return true;
			}
		}
		return false;
	}
	
	public boolean checkCompatible(Tutee tutee, Tutor tutor) {
		if (checkCourses(tutee.getCourse(0), tutor))
			if (checkTimes(tutee, tutor))
				return true;
		return false;
	}

}

@@ -47,199 +47,638 @@
 %0A%09%0A%09
-public boolean checkCourses(String course, Tutor tutor) %7B%0A%09%09for (int i = 0; i %3C tutor.coursesSize(); i++) %7B%0A%09%09%09if (tutor.getCourse(i).equals(course))%0A%09%09%09%09return true;%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%09
+/**%0A%09 * Checks whether the target course is found in the tutor's course list%0A%09 * @param course - The target course%0A%09 * @param tutor - The target tutor%0A%09 * @return true if the target course is found, false if not%0A%09 */%0A%09public boolean checkCourses(String course, Tutor tutor) %7B%0A%09%09for (int i = 0; i %3C tutor.coursesSize(); i++) %7B%0A%09%09%09if (tutor.getCourse(i).equals(course))%0A%09%09%09%09return true;%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%09%0A%09/**%0A%09 * Checks whether a time matches on both the tutor's and tutee's availability schedule%0A%09 * @param tutee - The target tutee%0A%09 * @param tutor - The target tutor%0A%09 * @return true if a match is found, false if not%0A%09 */
 %0A%09pu
@@ -922,16 +922,213 @@
 e;%0A%09%7D%0A%09%0A
+%09/**%0A%09 * Checks whether it is possible to match the tutee to a tutor%0A%09 * @param tutee - The target tutee%0A%09 * @param tutor - The target tutor%0A%09 * @return true if a match is found, false if not%0A%09 */%0A
 %09public 

Update to compatibility class