
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

In this homework, you will implement a simple text-based simulation of your choosing in Squeak (http://www.squeak.org). Note that Squeak is the implementation of Smalltalk that we will be using. You are free to simulate anything you wish; however your simulation must employ at least ten classes and two levels of inheritance. You are free to inherit from the built-in classes, but at least one of your classes must inherit from another class you wrote. Examples of things you might choose to simulate include some sort of city simulation, a simple ecosystem, expanding/trading/warring nations, an economic model, or possibly a group of adventurers. The basic idea is that you have a world consisting of a set of objects, and each object will do something at each time step in the simulation, i.e. attack, eat, rest, procreate, die, buy, sell, and so on. The actions each object performs will somehow influence the other objects in the simulation. Be creative in choosing your scenario, and don't feel bound to select one of the examples given above.
To get started, first visit Squeak.org to download Squeak. After becoming acquainted with Squeak's windowing environment, check out John Maloney's BankAccount tutorial to learn how to develop and work with classes in Squeak. Then check out the Squeak Wiki at http://minnow.cc.gatech.edu/squeak/ โ there are a number of tutorials on that website as well. Note that the tutorial links on the Squeak website do not work (as of the writing of this homework), but a mirror of the BankAccount tutorial is on the course website. Do all of your work in a new project. To start a new project, left-button click on the Squeak desktop to open the World menu, then select "open..." and then "morphic project." When you quit Squeak, don't forget to save your work by opening the World menu and choosing one of the save options at the bottom of the menu. Your project will be saved as part of your Squeak image. Store all of the classes you create for your project in a new class category called "My Simulation." This will help us find your classes when we grade your assignment.
To submit your work, you will first need to export your project to a file. To do this, open the World menu from within your project and select "save project on file..." to export your project. Your project file should have a *.pr extension. In addition to your project file, also provide a small text document containing instructions for invoking your simulation from the Workspace. Unless you instruct us otherwise, we will except your simulation to write its output to the Transcript. Specific submission instructions will follow (it is hoped that the course submission system will be used, but some code modifications will need to be made before that is possible).