Create the category Exercise in the Browser. All classes you create will be placed in this category.
Implement the class Operation (using Test-Driven Development) which should work like this:
Should return 0.a := Operation new. a result.
Should return 5.b := Operation new. b add: 2. b add: 3. b result.
Should return 3.Operation new add: 2; add: 4; divideBy: 2; result.
Add the message
Operation>>#multiplyBy
by yourself.
No comments:
Post a Comment