LearningCounter subclass: #ExerciseBoundedCounter
    instanceVariableNames: ''
    classVariableNames: '' poolDictionaries: ''
    category: 'LearnSqueak-Exercises'.
(Smalltalk at: #ExerciseBoundedCounter) compile: 'incrementBy: anInteger
    | candidate |
    anInteger isInteger ifFalse: [self error: ''Use a whole number''].
    candidate := value + anInteger.
    (candidate between: 0 and: 10)
        ifFalse: [self error: ''Counter must stay between 0 and 10''].
    value := candidate'.

ExerciseBoundedCounter startingAt: 8 label: 'Capacity'
