View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sp2001 Midterm Review: Write Smalltalk Code

Write ST code to build the figure:

You have to fix a bug to make the following work: 8-) Rik@smoo.com
Scamper openOnUrl:
'http://coweb.cc.gatech.edu:8888/cs2340/uploads/cs2340.gif'

pen text
pen _ Pen new.
pen up; goto: 100@100; down.

"drawing rectangle 1"
2 timesRepeat: [
pen turn:90; go: 70; turn: 90; go: 40.
].
"drawing rectangle 2"
pen up; goto: 110@110;down.
2 timesRepeat: [
pen turn:90; go: 50; turn: 90; go: 20.
].
text _ 'cs2340' asDisplayText.
text displayAt: 115@112.
Bharath Hemachandran

need this b4 "text displayAt: 115@112."
text foregroundColor: Color black backgroundColor: Color transparent.
chok




Link to this Page