David in Canada

 

Tech, life, and everything in between.

Day 14 — Student Report Generator (Final Project)

Updated at # Tech # Go

Overview

This project is a modular, data-driven Go application that reads student data from a file, processes it, and generates a structured report.

It demonstrates core backend engineering concepts:


Features


Project Structure

day14-student-report/
├── go.mod
├── main.go
├── input.txt
├── output.txt
└── student/
    ├── model.go
    ├── reader.go
    ├── processor.go
    └── writer.go

Architecture

1. main.go


2. student/model.go

Defines core data structure:

type Student struct {
    Name  string
    Age   int
    Score int
}

3. student/reader.go


4. student/processor.go

Business logic:


5. student/writer.go


Input Format (input.txt)

Alice 20 85
Bob 22 70
Charlie 19 95
David 21 95

Invalid lines are ignored safely.


Output Example (output.txt)

--- Student Report ---

Average Score: 78.10

Top Students:
- Charlie (95)
- David (95)

Grade Distribution:
A: 3
B: 2
C: 2
D: 2
F: 1

How to Run

From project root:

go run .

Error Handling Strategy


Key Learnings


Reflection

This project represents the transition from:

learning syntax → building real applications

It combines all prior concepts into a cohesive system and resembles a simplified backend data-processing service.


Next Steps


Summary

Day 14 marks the completion of a foundational Go learning path.

The result is a portfolio-ready project demonstrating: