Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
README
CS447 FALL 2025 P1 : Online Course Registration System
======================================================
Author: Ryan Bender
Date: October 1, 2025
Overview:
This project is an online course registration system designed for multiple users to access concurrently. Upon connecting, users must provide a username and then will have full access to the system. Three separate modes exist, each with its own set of commands. Catalog Mode allows users to view information for courses in the database file. Enrollment Mode allows users to enroll or drop a course. Enrolling in a course will decrement the number of seats available for all other users. Likewise, dropping a course will increment the seats available. Lastly, MyCourses Mode gives users an interface to see the classes they are enrolled in. To access specific commands, users must be in the associated mode for those commands. At any point while interacting with this system, a help menu will be displayed by entering the command 'help'.
Directory Structure of the Tarball:
BenderProject1/:
|- server.cpp: Starter code for the server application.
|- Makefile: Makefile to compile the server and client applications.
|- server.conf: Configuration file for the server (fill in the port number before running).
|- courses.db: A sample Text-based database for testing
|- p1_helper.h: Header file for the helper function to load courses database.
|- p1_helper.cpp: Implementation of the helper function. Implement the stub functionality.
|- server_help.h: Header file for additional helper functions.
|- server_help.cpp: Implementation of additional helper functions.
Compilation:
Compiling this project has a few different options:
1. Using MAKEFILE: Once in the directory, enter command 'make'. This should make your output name 'server'
2. To manual compile, enter 'g++ -std=c++20 -Wall -o server server.cpp p1_helper.cpp server_help.cpp'
Both of these methods will work unless the source code has been modifed after extraction.
How to Run:
Before attempting to run the program, ensure there is a server.conf file in the same directory as the compile C++ files. Without the configuration, the server will not have a port to connect to. Once you are ready to start the server, enter './server server.conf' into the CLI. The server will read in the configuration port and begin accepting clients. To connect a client, enter 'nc <server IP> <port>'. Once entered, the client should connect to the server and be greeted. The first entry after connect will be to login in using the "IAM" command and then the user will have full access to the system.
Notes and Design Choices:
This project consists of a few key design choices. The first is server logging. Every interaction a client does with this system is logged on the server along with the date and time it occured. This is a crutial step for the ACCOUNTING part of the 3 A's of cybersecurity. Additionly, the server provides assisted command help to the user. If the client entered and invalid command, the server attempts to help the client find the correct syntax. Lastly, this system support multi-client connections. Multiple users can be connected to and use this system at a time. The primary challenge of this project was parsing user commands with space characters within the same term. For example treating parameters such as 'Computer Science' as one term proved difficult, but was ultimately resolved for a comfortable experience for the user.
After completion of this project, there is one buggy aspect of it. While Netcat works as desired, Telnet does not support all aspect of this project. For full access to the working system, connecting via netcat (nc) is the only guarenteed and tested method for a properly working experience. Other methods may still work, but they have not been tested for this specific program.