The Gradebook Management System is a command-line Java application designed to manage grades for multiple classes. It provides a simple interface for managing classes, categories, assignments, students, and grades, ensuring comprehensive grade tracking and reporting capabilities.
- Create a new class.
- List all classes with the number of enrolled students.
- Activate a class to perform class-specific operations.
- Add categories with associated weights for an active class.
- Add assignments to specific categories with a name, description, and point value.
- List assignments grouped by categories for an active class.
- Add new students and enroll them in the active class.
- Enroll existing students in the active class.
- Display all students in the active class or filter by name/username.
- Assign grades to students for specific assignments.
- Automatically handle grade updates and point value limits.
- View a student's grades by category and calculate their total and weighted grade.
- Display the gradebook for the active class, showing each student's total and attempted grades.
- The system uses MySQL for persistent data storage, ensuring reliable performance and scalability.
| Command | Description |
|---|---|
test-connection |
Test the connection to the database. |
list-classes |
List all classes with the number of enrolled students. |
| Command | Description |
|---|---|
new-class [course] [term] [section] [description] |
Add a new class. |
select-class [course] [term] [section] |
Activate a class by specifying course, term, and section. |
show-class |
Show details of the active class. |
| Command | Description |
|---|---|
add-category [name] [weight] |
Add a new category to the active class. |
show-categories |
List all categories for the active class with their weights. |
add-assignment [name] [category] [description] [points] |
Add an assignment to a specific category in the active class. |
show-assignments |
List all assignments for the active class, grouped by category. |
| Command | Description |
|---|---|
add-student [username] [studentid] [last] [first] |
Add a new student and enroll them in the active class. |
add-student [username] |
Enroll an existing student in the active class. |
show-students |
List all students enrolled in the active class. |
show-students [filter] |
List all students with the filter applied to name/username. |
| Command | Description |
|---|---|
grade [assignment] [username] [grade] |
Assign or update a grade for a specific student. |
student-grades [username] |
Show all grades for a specific student, grouped by category, with a total grade. |
gradebook |
Display the gradebook for the active class, including total and attempted grades for all students. |
- Total Grade: Calculated using all assignments (graded or not), with category weights rescaled to 100.
- Attempted Grade: Calculated using only graded assignments.
The system performs as many computations as possible in SQL to ensure efficiency and consistency.
GradeBook/
├── README.md # Project documentation
├── src/
│ ├── Database.java # Database connection and utilities
│ ├── GradebookShell.java # Main application logic and commands
│ ├── libs/ # MySQL JDBC driver
│ ├── sql/ # SQL schema and data dump
-
Install MySQL:
- Ensure MySQL is installed and running on your system.
- Set up a database using the schema provided in
src/sql/schema.sql. - Load the example data using
src/sql/dump.sql.
-
Configure the Application:
- Update database credentials in the
Database.javafile.
- Update database credentials in the
-
Compile and Run:
javac -cp "src:src/libs/mysql-connector-j-9.0.0/mysql-connector-j-9.0.0.jar" src/*.java java -cp "src:src/libs/mysql-connector-j-9.0.0/mysql-connector-j-9.0.0.jar" GradebookShell
-
Create a Class:
new-class CS410 Sp20 1 "Databases" -
Add a Category:
add-category Homework 40 -
Add an Assignment:
add-assignment HW1 Homework "SQL queries homework" 50 -
Add a Student:
add-student jdoe 1 Doe John -
Assign a Grade:
grade HW1 jdoe 45 -
View the Gradebook:
gradebook