Homework

Homework — your Item struct

Now — YOUR app. The three loose variables become one record of your own type.

Requirements:

  1. type Item struct with at least 3 fields from your lesson-1 submission (correct types).
  2. A doc comment above the type (// Item is one ...).
  3. One record created with a literal using field names.
  4. formatItem(it Item) and printItem(it Item) — the functions take the record, not loose fields.
  5. Output identical to before (fourth refactor — behavior protected).

To submit: the code file + the output.

Tip. Your app currently prints one record and… ends. Next lesson is the big break: a for + switch menu loop, and for the first time the program RUNS — it spins, listens for commands and reacts until you say "enough".