Class
expenditureReasons!
1363659!
reporting!
0Cltn[Symbol]! !
#categories!
transaction recording!
inquiries!
private!
reporting! !
incomeSources!
1363825!
reporting!
0Cltn[Symbol]! !
#group!
tutorial! !
totalReceivedFrom:!
1362916!
inquiries!
0Symbol:Integer! !
#revision!
$Revision: 1.2 $! !
#instanceVariableString!
cashOnHand <Integer> incomes <VarDict[Symbol, Integer]> expenditures <VarDict[Symbol, Integer]>! !
receive:from:!
1362222!
transaction recording!
0Integer:Symbol:! !
report!
1363981!
reporting!
0SeqCltn[Character]! !
setInitialBalance:!
1363394!
private!
1Integer:! !
totalSpentFor:!
1363153!
inquiries!
0Symbol:Integer! !
spend:for:!
1362503!
transaction recording!
0Integer:Symbol:! !
cashOnHand!
1362771!
inquiries!
0Integer! !
#extensionsAreSubtypes!
true! !
#subtype!
true! !
#branded!
true! !
#comment!
Blue book FinancialHistory example, slightly revised to run in our system.
The intent is to use it to demonstrate the advantages of typechecking.

This example originally appeared in the books
"Smalltalk-80: The Language and its Implementation" (aka "the blue book")
and
"Smalltalk-80: The Language" (aka "the purple book")
both by Adele Goldberg and David Robson, 
published by Addison-Wesley in 1983 and 1989 respectively.
Thanks to Adele Goldberg for permission to use these examples.

The code here differs from the blue/purple book in the following details:

1. We have added type annotations.n
2. In the report method, we create reportStream using CharacterReadWriteStream>>over:
rather than WriteStream>>on:. This reflects library differences between our system and the
blue book, necessitated by typing constraints.

To see some of the benefits Strongtalk provides:

 a. Try and determine how to call the methods of this class, based on the headers given in
 the protocol description in the blue book. Then look at the signatures provided here.
 You will see how valuable type information is in increasing code readability.
 
  b. Compare the results of typechecking the
report method to the account of debugging given on pages 315-327 of the blue (actually, purple)
book.

(c) Sun Microsystems, Inc. ALL RIGHTS RESERVED. 
Use and distribution of this software is subject to the terms of the attached source license .! !
#abstract!
false! !
#superclassTypeString!
Object! !
