DAY 3 — Structs and Modeling Data (One Concept at a Time)

Goal (End of Day 3)


  1. What a Struct Is

Concept

Example type Person struct { Name string Age int }

Rules

Exercise


  1. Creating and Using Struct Values

Concepts

Example p := Person{Name: "Alice", Age: 30} fmt.Println(p.Name)

Rules

Exercise


  1. Passing Structs to Functions

Concepts

Example func printPerson(p Person) { fmt.Println(p.Name, p.Age) }

Exercise


  1. Pointers to Structs (Intro Only)

Concepts

Example func birthday(p *Person) { p.Age += 1 }

Rules

Exercise


  1. Mini Program (Mandatory)

Program: Library Item

Requirements


Exit Criteria (Must All Be True)


Day 4 Preview