Activity 01
Pair Programming: Design a Bank Account Class
Pairs define a BankAccount class with attributes like balance and methods like deposit() and withdraw(). They create instances, test transactions, and discuss encapsulation by hiding balance changes. Pairs share one success and one error with the class.
Explain the fundamental concepts of objects, classes, and instances.
Facilitation TipDuring Pair Programming, circulate and ask each pair to explain why they chose a particular attribute or method for their Bank Account class before coding.
What to look forPresent students with a short code snippet or pseudocode. Ask them to identify: 1) Which parts represent a class definition, 2) Which parts represent object instantiation, and 3) What are the attributes and methods of the objects created?