Aa

Text size

?

Map / Classes

🏗️ Classes

A class is a blueprint; new makes objects from it. Each object keeps its own fields, constructors set them up, and private fields are reached through methods.

  • class
  • new
  • constructor
  • this
  • private
  • getter
  • setter
  • toString
  • static field

🛠 You will build: A bank account and a student record

0 / 10 done

  1. 🔮 Predict 1. Two separate objects
  2. 👣 Trace 2. Two names, one object
  3. 🔮 Predict 3. One count for the whole class
  4. 🧩 Order 4. Write the constructor
  5. ✏️ Fill in 5. Getter and setter
  6. 🐞 Debug 6. Private means private
  7. 🐞 Debug 7. The name that hides the field
  8. 🐞 Debug 8. You need an object
  9. 🔧 Modify 9. Print an object nicely
  10. ⌨️ Write 10. A bank account

Unit check

Earlier activities again, with new inputs and edge cases. They also come back on the map as review the next day.

  1. 👣 Trace Check 1. Check: who changed the counter?
  2. ⌨️ Write Check 2. Check: a thermostat