Structured Problem Solving The SmallTalk Environment
Installing Smalltalk You can log onto the MCC and obtain a copy of Smalltalk by clicking on this link:
Starting Smalltalk When you have downloaded and unzipped Smalltalk, you need to find the folder and double-click on VW.exe
The First Window When this window appears, you are ready to start your Smalltalk session. Do not do anything to the text in this window, it is just information. Click on File – New Workspace
Starting a New Worskspace This window appears Type in Session1 New Drag the cursor over the text, and right-click. Select Do it
Summary: The SmallTalk Workspace Starting a New workspace: Select File – New Workspace Adding Text: Type in, it is a text editor. Saving:Select File – Save Opening:Select File – Open Executing: Select the Text, right click, Do it
The Smalltalk Pieater Control Screen This control panel allows you to send massages and interact with PieEater objects. Click on Start
The PieEater Grids
Messages
A New Object
Longer Programs
Repeating…
Attributes Names for Attributes will: Begin with a lower case letter Contain no spaces e.g. customerName numberOfRecords colour
Names for Protocols Names for Protocols will: Begin with a lower case letter Contain no spaces e.g. reserveVideo turnRight red
Messages 1 Each message which sets an attribute value has the structure: attribute:value For example to set a customer name we would send the message: customerName: Tony The message to an object called customer would be: customer customerName: Tony
Messages 2 Each message which requests an attribute value as a reply should be given the same name as the attribute name. for example: customerName is the message which requests the value of an object’s customerName