Object subclass: #BankAccount instanceVariableNames: 'value ' classVariableNames: '' poolDictionaries: '' category: 'OOCourse'! !BankAccount methodsFor: 'initialize-release'! initialize "initialize bank account" value := 0! ! !BankAccount methodsFor: 'printing'! printOn: aStream aStream nextPutAll: ('Un compte en banque contenant ',value printString,'.- Fr.')! ! !BankAccount methodsFor: 'accessing'! deposit: anAmount "deposit a given amount on the account" value := value + anAmount. ^self! value "Get account's current value" ^value! withdraw: anAmount "withdraw a given amount from the account" value := value - anAmount. ^self! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! BankAccount class instanceVariableNames: ''! !BankAccount class methodsFor: 'instance creation'! new ^(super new initialize)! !