6.3.2Adding Some Methods
Now we define some instance methods to initialize and change the value of the counter.
WebCounter>>initialize
super initialize.
count := 0
WebCounter>>increase
count := count + 1
WebCounter>>decrease
count := count - 1
Now we define some instance methods to initialize and change the value of the counter.
WebCounter>>initialize
super initialize.
count := 0
WebCounter>>increase
count := count + 1
WebCounter>>decrease
count := count - 1
Copyright © 5 June 2023 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.
This book is published using Seaside, Magritte and the Pier book publishing engine.