-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from CSC207-2022F-UofT/feature-7-enrolment-per…
…sistence-tests Feature 7 debugging + feature refinement
- Loading branch information
Showing
41 changed files
with
875 additions
and
487 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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 |
---|---|---|
@@ -1,43 +1,44 @@ | ||
package entities; | ||
|
||
import java.io.Serializable; | ||
import java.util.HashMap; | ||
|
||
/** | ||
* A map of courseID to the Course | ||
*/ | ||
|
||
public class CourseMap implements Serializable { | ||
private static HashMap<String, Course> courseMap; | ||
|
||
|
||
/** | ||
* Find a course using its unique ID | ||
* @param id the unique ID of the course | ||
* @return the Course object associated with the ID | ||
*/ | ||
public static Course findCourse(String id) { | ||
return courseMap.get(id); | ||
} | ||
|
||
/** | ||
* @param id the unique ID of the Course object | ||
* @param course the course associated with Course | ||
* @return if the course has been added | ||
*/ | ||
public static boolean addCourse(String id, Course course) { | ||
if (courseMap.containsKey(id)) { | ||
return false; | ||
} | ||
courseMap.put(id, course); | ||
return true; | ||
} | ||
|
||
public void save() { | ||
|
||
} | ||
|
||
public void load() { | ||
|
||
} | ||
} | ||
// | ||
//import java.io.Serializable; | ||
//import java.util.HashMap; | ||
// | ||
///** | ||
// * A map of courseID to the Course | ||
// */ | ||
// | ||
//public class CourseMap implements Serializable { | ||
// private static HashMap<String, Course> courseMap; | ||
// | ||
// | ||
// /** | ||
// * Find a course using its unique ID | ||
// * @param id the unique ID of the course | ||
// * @return the Course object associated with the ID | ||
// */ | ||
// public static Course findCourse(String id) { | ||
// return courseMap.get(id); | ||
// } | ||
// | ||
// /** | ||
// * @param id the unique ID of the Course object | ||
// * @param course the course associated with Course | ||
// * @return if the course has been added | ||
// */ | ||
// public static boolean addCourse(String id, Course course) { | ||
// // 2 courses have the same id | ||
// if (courseMap.containsKey(id)) { | ||
// return false; | ||
// } | ||
// courseMap.put(id, course); | ||
// return true; | ||
// } | ||
// | ||
// public void save() { | ||
// | ||
// } | ||
// | ||
// public void load() { | ||
// | ||
// } | ||
//} |
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
2 changes: 1 addition & 1 deletion
2
...ourses_features/CourseCreationFailed.java → ...course_features/CourseCreationFailed.java
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
7 changes: 3 additions & 4 deletions
7
...ures/CourseCreationResponseFormatter.java → ...rse_features/CourseCreationPresenter.java
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
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
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
2 changes: 1 addition & 1 deletion
2
...urses_features/CourseEnrolmentFailed.java → ...ourse_features/CourseEnrolmentFailed.java
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
Oops, something went wrong.