Skip to main content

ProwessApps

Learn · Practice · Excel

Java implementation

Student Grade Calculator in Java

Build a console application that calculates totals, averages, grades, and pass or fail results.

Setup instructions

This project uses plain Java without any complex build tools.

1. Ensure you have Java (JDK 17 or newer) installed.
2. Extract the downloaded ZIP file.
3. Open your terminal and navigate to the extracted `src` directory.
4. Compile all the Java files by running: `javac *.java`
5. Start the application by running: `java Main`

Project files

    Solution explanation

    All project files are now located together in the `src` folder for simplicity:

    - `Student.java`, `GradeReport.java`, `SubjectMark.java`, `ResultStatus.java`, `Grade.java`: The core data models representing the student and their marks.
    - `GradeCalculator.java`, `GradingPolicy.java`, `StandardGradingPolicy.java`: The core business logic for calculating grades based on the provided policy.
    - `ConsoleInput.java`, `ReportPrinter.java`: Classes dedicated to handling keyboard input and nicely formatting the output report.
    - `Main.java`: The entry point that ties everything together and starts the application.