CSV Gradebook
Build a Java command-line gradebook: import a CSV file of student grades (one row per student, one column per assignment), and get statistics per student (average, highest and lowest grade, and a final letter grade) and per assignment (average, median and how many students got each letter), plus a list of students at risk of failing. Assignments can have different weights, missing grades are handled explicitly, and results can be exported as JSON with Jackson. It's a good first Java project: you'll learn records and classes, reading CSV (with Jackson's CSV module), streams and collectors for statistics, validating messy input, formatting output, and testing with JUnit.
- Estimate
- ~8h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Jackson CSV · Jackson · JUnit 5
Project roadmap
- 01
Define the input and output
~1hWrite README.md: the CSV format (a header with student id, name and assignment names, then one row per student, with empty cells meaning missing grades), an optional weights file, the rules for missing grades (counted as 0 or skipped, chosen by an option), the letter grade bands, and example output. Create a Maven or Gradle project with jackson-dataformat-csv and JUnit 5. Done when: README.md defines the input, rules and output.
- 02
Read and validate the CSV
~1.5hRead the file with Jackson's CsvMapper using the header, and convert rows into Student records with a map of assignment to grade. Validate every row: a student id is present and unique, grades are numbers from 0 to 100 or empty, and names aren't empty. Collect all errors with their line numbers and print them together. Done when: a clean file loads, and a messy file lists all its problems.
- 03
Compute student statistics
~1.5hFor each student, compute the weighted average (applying the missing grade rule), the highest and lowest grade, and a letter grade from the bands, using streams. Flag students at risk (for example an average below 60 or more than two missing grades). Done when: averages for a few students match hand calculations, including weights and missing grades.
- 04
Compute assignment statistics
~1.5hFor each assignment, compute the average, median, highest and lowest grade and the number of missing grades, and count students per letter grade with Collectors.groupingBy. Done when: the statistics for each assignment are correct for the sample file.
- 05
Print and export the report
~1hPrint aligned tables for students (sorted by average) and assignments, and the at-risk list, formatting numbers to one decimal. With --json FILE, write all results as JSON with Jackson's ObjectMapper. Done when: the printed report is readable, and the JSON file contains the same numbers.
- 06
Test it
~1.5hWrite JUnit 5 tests: parsing valid and invalid rows, weighted averages with both missing grade rules, medians for even and odd counts, letter grade boundaries, and the JSON export. Done when: all tests pass.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack