Skip to content

Course contents (draft)

J-Donald Tournier edited this page Dec 9, 2024 · 20 revisions

Week 1

Session 1: Introduction to the command-line, first steps

Exercises TODO

Session 2: first project, input/output, functions

Exercises TODO


Week 2

Session 1: multi-file project, error handling

Exercises TODO

Session 2: debugging, advanced string formatting

Exercises TODO


Week 3

Session 1: classes

Session 2: fMRI project

Exercises TODO


Week 4

Session 1: introduction to operator overloading and templates

Session 2: lambda expressions

Exercises TODO


Week 5

Session 1:

  • inheritance
  • virtual functions
  • difference between virtual and overloaded functions
  • static / dynamic binding
  • pure virtual functions
  • abstract and concrete classes
  • class vs. object vs. instance

Session 2:

Exercises TODO


Week 6

Session 1: Object-oriented design

  • aggregation, composition, inheritance
  • object lifetime & ownership
  • OOP design principles (SOLID):
    • DRY (Don’t repeat yourself)
    • Encapsulate What Changes
    • Open Closed Design Principle
    • Single Responsibility Principle
    • Dependency Injection or Inversion principle
    • Favor Composition over Inheritance
    • Liskoff substitution principle
    • Interface Segregation Principle
    • Programming for Interface not implementation
    • Delegation principles
  • UML overview
  • UML class diagrams
  • typical workflow for the OOP design

Session 2: Peer marking

  • Peer marking
  • go through solution and marking scheme
  • ...?

Week 7

Session 1:

Session 2:

Exercises TODO


Week 8

Session 1:

Session 2:

Exercises TODO


Week 9

Session 1:

Session 2:

Exercises TODO


Week 10

Session 1: pointers and manual memory management

  • pointers
  • C-style arrays
  • C-style string handling
  • new / delete
  • memory leaks
  • double free
  • array new[] & delete[]
  • using constructor / destructor / copy constructor / assignment operator to manage memory

Session 2:

Exercises TODO



Topics not yet covered:

  • switch statement
  • jump statements: break and continue
  • conditional (ternary) operator (?:)
  • Resource Acquisition Is Initialization (RAII)
  • the function stack
  • recursion
  • categories using enumerated types (enums)
  • class destructor
  • multi-line comments and why they're usually best avoided
  • dynamic vs. static type checking
  • std::array
  • difference between std::vector::operator[] and std::vector::at() in terms of bounds checking
  • expressions with mixed types, implicit type casting, integer promotion, ...
  • destructors
  • static data members
  • copy constructor
  • virtual functions
  • pure virtual functions
  • abstract and concrete classes
  • inheritance vs. composition
  • member function overloading
  • difference between virtual and overloaded functions
  • static / dynamic binding
  • OOP design - REQUIRES A LOT OF THOUGHT!
  • UML
  • composition / aggregation / inheritance
  • operator overloading
  • friend functions
  • operator overloading: global or member?
  • this pointer
  • overloading the assignment operator
  • runtime vs. compile-time/static polymorphism
  • object lifetime & ownership
    • relationship to composition & aggregation, etc.
  • OOP principles: encapsulation, polymorphism, inheritance, abstraction
  • OOP design principles (SOLID):
    • DRY (Don’t repeat yourself)
    • Encapsulate What Changes
    • Open Closed Design Principle
    • Single Responsibility Principle
    • Dependency Injection or Inversion principle
    • Favor Composition over Inheritance
    • Liskoff substitution principle
    • Interface Segregation Principle
    • Programming for Interface not implementation
    • Delegation principles

Open questions:

  • how use inheritance in a meaningful way without pointers?
    • should be fine using references instead
  • how to demonstrate aggregation without pointers?
  • blog abour OOP design process
    • how to teach design?
    • how to assess design?

NOT covered in course: