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