CSE215 Assignment-1
CSE215 Assignment-1
Submission Rules:
Submit the required .java files and a PDF with your answers to theoretical questions.
Submit before the deadline to avoid penalties.
Background
You are required to implement a Class Management System that supports students,
teachers, and teaching assistants. The program will allow students to enroll in courses,
teachers to manage students in their courses, and teaching assistants to view course
information and make announcements. You must design the system using Object-
Oriented Programming (OOP) principles.
(Note: You cannot use any other JAVA library classes except Array, ArrayList, Scanner
and Date.)
2. Java Implementation
Develop a Java program with the following specifications:
● System Setup:
Create a Session class to handle data management for users and courses. Use singleton
pattern to ensure only one session is active at a time.
● Class Structure:
- Implement the classes from the UML diagram.
- Use interfaces to define common actions across different roles. For instance, all user
types should implement an Action interface with a method handleActions().
● Role-Specific Functionalities:
Student: Can add and drop courses. The system should prevent adding a course if a
schedule conflict exists. Show the enrolled course list.
Teacher: Can view the list of sections they teach and manage students (add or remove).
TA: Can view course details and make announcements but cannot manage enrollments.
TA’s should be able to make announcements related to the courses they assist with. Each
announcement should include the course name, the message, and the date.Students should
be able to view announcements for the courses they are enrolled in.
- Ensure that students cannot enroll in multiple sections of the same course.
- Limit the number of students in each section to 5.
- Implement error handling for cases like duplicate enrollments, invalid course IDs, and
authentication failures.
[email protected] password T1 A
[email protected] password T2 B
[email protected] password A1 A
[email protected] password A2 B
1 Course A 1 A T1 A
2 Course A 2 A T2 A
3 Course A 3 B T1 B
4 Course B 1 A T1 A
5 Course C 1 B T2 A
6 Course C 2 C T1 B
Session Class Outline:
class Session {
private static Session session = null;
private ArrayList<User> userList;
private ArrayList<Course> courseList;
public Scanner inputScanner = new Scanner(System.in);
private Session() {
createDatabase();
}
class CourseManagement {
while (true) {
System.out.print("Email:");
.nextLine();
System.out.print("Password:");
.nextLine();
Input/Output Format:
Login:
Main Menu:
1 View Courses
5 Logout
Student Menu:
1 Add Course
3 Drop Course
4 Back
> User input
Teacher Menu:
1 View Courses
2 Manage Student(Remove)
3 Back
TA menu:
1 View Courses
2 Make Announcements
3 Back