Skip to content

Week 4 - Methods, Reuse and OOP Thinking

This week continues Section 5 and moves from storing data to organising code. The aim is to turn repeated logic into reusable methods and to start thinking in classes, objects and responsibilities.

Key knowledge and skills

  • procedures, functions and methods
  • parameters, arguments and return values
  • classes, objects, abstraction and encapsulation
  • modular program structure that supports readability and maintenance
  • using methods to simplify a larger solution

Coding principles covered

  • repeated logic should be moved into a method instead of copied
  • methods should have a clear single purpose
  • use return values when a method calculates something
  • keep Main short by delegating work to well-named methods

Useful theory pages

Task checklist

  • [ ] Open the Week 4 programming task outline and complete the Week4_Methods console app module.
  • [ ] Use your Week 3 inventory data, or create an equivalent data set, so your methods have real data to process.
  • [ ] If time allows, add the IsLowStock extension.
  • [ ] Revisit Section 5 Test Your Knowledge as retrieval practice while you move from data structures into modular design.
  • [ ] Complete or refine Section 5 Applied Task with a stronger focus on functions, procedures and OOP thinking.
  • [ ] Upload your methods program and your Section 5 work to your GitHub repo.