DEV Community

Julian
Julian

Posted on • Originally published at julianmoreno.hashnode.dev on

Building My First C++ Grade Manager: Solving Real Student Problems πŸ“Š

Hey everyone! πŸ‘‹

As a computer science student, I'm always looking for ways to apply what I learn in class to real-world problems. I firmly believe that building tools you actually need is the best way to learn.

Today, I want to share a fun milestone in my journey as a developer: I just finished my Student Grade Manager project in C++! πŸš€

The Problem πŸ€”

Let's be honest, whether you are in university or school, keeping track of your grades and calculating that final average can be unnecessarily stressful. You are constantly crunching numbers to see what score you need on the final exam to pass the semester.

Instead of relying on random spreadsheets, I decided to code my own solution.

How It Works πŸ’»

The project is a basic but robust grade manager built entirely in C++. It allows a user to input their subjects, track their grades, and automatically calculate their overall average.

It was a great exercise in structuring logic, handling user inputs, and managing data directly from the console.

float calcularPromedioPonderado(const vector<Materia>& materias){
    float promedio = 0;
    int creditosTotal = 0;
    if(materias.size() == 0){
        return 0.0;
    }
    for(const Materia& m : materias){
        promedio += m.nota * m.creditos;
        creditosTotal += m.creditos;
    }
    if(creditosTotal == 0){
        return 0;
    }
    return promedio / creditosTotal;
}

Enter fullscreen mode Exit fullscreen mode

What's Next? 🌐

Now that the core logic is solid in C++, I'm already diving into my next challenge: bringing this tool to the browser! I'm currently working on a fully dynamic web application version using HTML, CSS, and JavaScript. The goal is to build an interactive subject table where students can add their grades on the fly and see their averages update in real-time.

Check it out! πŸ‘€

You can check out the source code for the C++ version on my GitHub repository here: πŸ‘‰ github.com/SRSURY/student-grade-manager-cpp

If you are also learning to code, don't just follow tutorialsβ€”build tools for yourself! It changes everything.

Have you ever built a project to solve a personal problem? Let me know in the comments! πŸ‘‡

Follow my journey as I build in public!

#100DaysOfCode #CodeNewbie #CPP

Top comments (0)