Activity 01
Pair Programming: Bank Account Class
Pairs create a BankAccount class with attributes for balance and account number, and methods for deposit and withdraw. They test with sample transactions, handling invalid inputs. Pairs then exchange code to debug and suggest improvements.
Explain the benefits of an object-oriented approach over procedural programming.
Facilitation TipDuring Pair Programming: Bank Account Class, circulate with a checklist that flags common errors like using global variables instead of instance attributes.
What to look forPresent students with a scenario, such as a 'Book' in a library. Ask them to list 3 attributes (e.g., title, author, ISBN) and 2 methods (e.g., 'borrow', 'return') for a Book class. Then, ask them to create one specific 'Book' object with sample values.