Skip to content

ll5313-spec/Course-Registration-System

Repository files navigation

Course-Registration-System

A Java-based command-line course registration system built as a project for Data Structures (Fall 2025). The system supports two user roles (Admin and Student) and demonstrates core object-oriented programming principles including inheritance, polymorphism, abstraction, and encapsulation.


Project Overview

The system simulates a university course registration environment where:

  • An Admin can manage courses and student accounts
  • A Student can browse, register for, and withdraw from courses
  • Data is persisted between sessions using Java serialization

Features

Admin

  • Create, edit, delete, and display courses
  • Register student accounts
  • View all courses / view full courses
  • Export full courses to a .txt file
  • View students enrolled in a course
  • View all courses a student is registered for
  • Sort courses by number of registered students

Student

  • View all courses
  • View available (not full) courses
  • Register for a course
  • Withdraw from a course
  • View personal course list

OOP Concepts Demonstrated

Concept Implementation
Abstract Class User is abstract; defines shared attributes and requires subclasses to implement showMenu()
Inheritance Admin and Student both extend User, sharing username, password, firstName, lastName
Polymorphism A User reference points to an Admin or Student object at runtime; showMenu() dispatches to the correct implementation
Method Overriding Both Admin and Student override showMenu() and interface methods like viewAllCourses()
Method Overloading Course has two constructors — one with an empty roster, one accepting an existing ArrayList<String> of student names
Encapsulation All Course attributes are private; accessed and modified only through public getters and setters
Interfaces AdminInterface and StudentInterface define role-specific method contracts
ADT ArrayList<Course> and ArrayList<Student> are used as abstract data types throughout the system

System Architecture

The project consists of 8 Java source files:

├── CourseRegistrationSystem.java  # Main class — login flow, serialization/deserialization
├── User.java                      # Abstract base class for Admin and Student
├── Admin.java                     # Admin role — extends User, implements AdminInterface
├── Student.java                   # Student role — extends User, implements StudentInterface
├── Course.java                    # Course data model with getters, setters, toString
├── FileManager.java               # Utility class — loads courses from CSV
├── AdminInterface.java            # Interface defining Admin method contracts
└── StudentInterface.java          # Interface defining Student method contracts

A hand-drawn design map (Overall_design_map.pdf) illustrating the class relationships and program flow is included in this repository.


Data Persistence

  • On startup, the system checks for a saved CourseRegInfo.ser file (Java serialization)
  • If found, course and student data are deserialized and restored
  • If not found, courses are loaded fresh from MyUniversityCourses.csv
  • On exit, all data is serialized back to CourseRegInfo.ser

Note: MyUniversityCourses.csv is not included in this repository as it contains course data from a private university dataset.


Course Info

  • Course: Data Structures(CS 102), NYU
  • Instructor: Professor Anasse Bari
  • Semester: Fall 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages