Skip to main content

Practice

Classes, constructors, invariants

⭐⭐ intermediate~30 min of coding3 challenges

Design small types: an enforced counter, an explicit-only constructor, member ordering.

Checking your progress…0%

What you will practice

  1. A class with an invariant⭐⭐ intermediate
  2. explicit shuts the trap⭐⭐ intermediate
  3. Member initialization order⭐⭐ intermediate

Need the concept first? Re-read the lesson.