Skip to main content

ProwessApps

Learn · Practice · Excel

C# implementation

Student Grade Calculator in C#

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

Setup instructions

This project is built using modern .NET (C# 10+) and uses the standard .NET CLI.

1. Ensure you have the .NET SDK installed (v6.0 or newer).
2. Extract the downloaded ZIP file.
3. Open your terminal and navigate to the `src/StudentGradeCalculator/App` directory.
4. Run the application using: `dotnet run`
5. To run the automated tests, navigate to the project root and run: `dotnet test`

Project files

    Solution explanation

    - `Domain/`: Contains `record` types and immutable models (`Student`, `GradeReport`).
    - `Services/`: Contains the `GradeCalculator` and `IGradingPolicy` interfaces.
    - `IO/`: Console wrappers (`ITextConsole`) for dependency injection and testing.
    - `App/Program.cs`: The modern top-level statements entry point.