Note that "teacher" is assigned to a course. So it is not a lack of courses that's causing the issue.
It's likely a SQL syntax error, as that causes connectionManager.query() to return null;
Enter your username: teacher
Login successful!
1 List all courses
2 View schedule
3 Assign a grade
Select an option (1-3): 2
Exception in thread "main" java.lang.NullPointerException
at cmput402.beartrails.ScheduleManager.getTeacherSchedule(ScheduleManager.java:49)
at cmput402.beartrails.ui.menu.ViewTeacherScheduleMenuAction.execute(ViewTeacherScheduleMenuAction.java:20)
at cmput402.beartrails.ui.menu.Menu.go(Menu.java:83)
at cmput402.beartrails.App.main(App.java:77)
Steps (with database that I committed):
Note that "teacher" is assigned to a course. So it is not a lack of courses that's causing the issue.
It's likely a SQL syntax error, as that causes connectionManager.query() to return null;
Enter your username: teacher Login successful!
1 List all courses 2 View schedule 3 Assign a grade Select an option (1-3): 2 Exception in thread "main" java.lang.NullPointerException at cmput402.beartrails.ScheduleManager.getTeacherSchedule(ScheduleManager.java:49) at cmput402.beartrails.ui.menu.ViewTeacherScheduleMenuAction.execute(ViewTeacherScheduleMenuAction.java:20) at cmput402.beartrails.ui.menu.Menu.go(Menu.java:83) at cmput402.beartrails.App.main(App.java:77)