![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The rabbits simulation illustrates typical application construction: Smalltalk applications typically are built around an application instance, which is the sole instance of an application class. The application instance typically has two roles:
The rabbit-simulation application developed in this chapter is centered on an
instance of the RabbitApplication
class, which contains
rabbits
, month
, and history
instance variables. The
initialize
and tickTo:
messages initialize variable values
and launch the application. The argument supplied with the tickTo:
message specifies how much time is to be simulated.