A clean, modular Java console application for managing academic courses with persistent file storage, recursive searching, and a user-friendly menu-driven interface.
The Student Course Management System is a lightweight Java console application designed to simplify the management of academic course records.
Users can add new courses, search for existing courses, view all registered courses, calculate the total number of credit units, and save or load course information using a persistent text file.
The application follows a modular architecture that separates the data model, business logic, and user interface, making the codebase easier to understand, maintain, and extend.
Whether you're learning Java, exploring object-oriented programming, or looking for a simple reference implementation of a console-based CRUD application with file persistence, this project provides a practical and easy-to-follow example.
- β Add new courses
- β Prevent duplicate course codes
- β View all registered courses
- β Search courses by code using recursion
- β Calculate total registered credit units
- β Save course records to a text file
- β Load saved course records
- β Input validation for user entries
- β Unsaved changes detection before exit
- β Clean, menu-driven console interface
- β Modular and maintainable project structure
The application's central dashboard provides quick access to every feature through a simple numbered menu.
Register a new course by entering its code, title, and credit units. Duplicate course codes are automatically rejected.
Display every registered course in a neatly formatted table showing the course code, title, and credit units.
Locate any registered course using its course code. This feature is powered by a recursive search algorithm.
Instantly calculate the total number of registered courses and the combined credit units.
Save all registered courses to persistent storage for future use.
Reload previously saved courses into the application.
Before closing the application, users are prompted to save any unsaved changes, helping prevent accidental data loss.
- Java Development Kit (JDK) 21 or newer
- Object-Oriented Programming (OOP)
- Java Collections (
ArrayList) - File Handling (
BufferedReader,BufferedWriter) - Exception Handling
- Recursion
- IntelliJ IDEA
- Git & GitHub
This guide will help you set up and run the project on your local machine. Whether you're new to Java or an experienced developer, you should be able to get the application running in just a few minutes.
Before you begin, ensure you have the following installed:
- Java Development Kit (JDK) 21 or newer
- Git (optional, for cloning the repository)
- A terminal or command prompt
- (Optional) IntelliJ IDEA Community or Ultimate Edition
To verify that Java is installed correctly, run:
java --versionIf Java is installed, your terminal will display the installed JDK version.
There are two ways to obtain the project.
git clone https://github.com/botishbot/StudentCourseManagement.gitNavigate into the project folder:
cd StudentCourseManagement- Open this repository on GitHub.
- Click the green Code button.
- Select Download ZIP.
- Extract the archive.
- Open the extracted project folder.
- Open IntelliJ IDEA.
- Select Open.
- Choose the project folder.
- Allow IntelliJ to index the project.
- Open
src/Main.java. - Click Run.
Compile the project:
javac -d out src/Main.java src/model/*.java src/service/*.java src/ui/*.javaRun the application:
java -cp out MainNote
Run the application from the project root directory. Running it from inside the
outfolder may prevent the application from locating thedata/courses.txtfile.
After launching the program, a menu-driven interface will appear.
Simply choose the corresponding menu number to perform an operation such as:
- Add a new course
- View all registered courses
- Search for a course
- Calculate total credit units
- Save courses
- Load previously saved courses
- Exit the application
Input prompts guide you through each operation, making the application easy to use without prior experience.
The project was designed with simplicity, modularity, and maintainability in mind. Each package has a clearly defined responsibility, making the codebase easier to understand and extend.
The application follows object-oriented programming principles by separating the data model, business logic, and user interface into independent components.
The project is organized into dedicated packages (model, service, and ui) to promote clean code and separation of concerns.
Course searching is implemented recursively, demonstrating an alternative approach to traversing collections while keeping the implementation concise.
Course records can be saved to and loaded from a text file, allowing data to persist between application sessions.
User input is validated throughout the application to reduce invalid entries and improve the overall user experience.
The application tracks modifications made during runtime and reminds the user to save before exiting, helping prevent accidental data loss.
StudentCourseManagement/
β
βββ data/
β βββ courses.txt
β
βββ screenshots/
β
βββ src/
β βββ model/
β β βββ Course.java
β β
β βββ service/
β β βββ CourseManager.java
β β
β βββ ui/
β β βββ ConsoleUi.java
β β
β βββ Main.java
β
βββ LICENSE
βββ README.md
| Package | Responsibility |
|---|---|
model |
Defines the Course class and represents application data. |
service |
Contains the business logic, including course management, recursion, and file operations. |
ui |
Implements the console-based user interface and user interaction. |
Main |
Application entry point responsible for starting the program. |
Possible enhancements include:
- Edit existing courses
- Delete registered courses
- Sort courses by code or title
- Database integration
- Graphical User Interface (GUI)
- Export course data to additional formats
The current architecture was intentionally designed to make these enhancements easier to implement in the future.
Contributions, suggestions, and improvements are welcome.
If you find a bug or have an idea for improving the project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
See the LICENSE file for more information.
BotishBot
GitHub: https://github.com/botishbot
If you found this project useful, consider giving it a β on GitHub.







