![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
What is an objectThe short answer: "Everything is".In Squeak, you program by creating or using objects. You get objects in several ways:
Objects can be composed of other objects. Just as we discussed in the real world, a car has many pieces, each of which may have many pieces, the same is true in Squeak. One of the nicest things about programming in Squeak is that a lot of work is done automatically for you. Every object you create automatically comes with many useful properties (like an x value, a y value) and behaviors (like knowing how to move forward or rotate) which we will explore. Some objects have special properties which we'll also talk about. There is also an "object catalog" which is itself an object, sitting inside the supplies bin. While it is fun to play with the many things in the object catalog, for now, we will look only at sketches that you draw, and simple shapes (Ellipse, Star, Curve) that you can pull out of the Supplies bin. Link to this Page
|