Alice chap 1 - 1 Chapter C5777 36525 8/12/05 1 11:37 AM...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
After finishing this chapter, you should be able to: o Provide a brief definition of the following terms: algorithm, class, computer program, event, function, Integrated Development Environment (IDE), instance, instantiation, method, method parameter, object, object-oriented programming (OOP), programming language, property, state of an object. o Run the Alice software and locate and describe the following components of the Alice interface: World window, Object tree, Details area, Editor area, Events area, menu bar, trash can, clipboard, Play button, Undo button, Redo button. o Load and play an existing Alice world. o Create a new Alice world by adding objects to a blank world, positioning them, and using simple methods to animate those objects. o Print the code for Alice methods and events. AN INTRODUCTION TO ALICE AND OBJECT-ORIENTED PROGRAMMING 1 1 1 Chapter C5777 36525 8/12/05 11:37 AM Page 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Chapter 1 • An Introduction to Alice and Object-Oriented Programming OBJECT-ORIENTED PROGRAMMING AND ALICE An algorithm is a step-by-step process. A computer program is a set of instructions telling a computer how to perform a specific task. As such, every computer program is an algorithm. Early computers were far less complex than com- puters are today — their memories were smaller and their programs were much simpler. In order to help manage the growing complexity of computers, computer scientists have introduced the notion of objects and object-oriented programming . An object is anything that is manipulated by a computer program. It is possible for modern computers to manipulate many objects at the same time. An object can be something in the physical world or even just an abstract idea. An airplane, for example, is a physical object that can be manipulated by a computer. Almost all commercial aircraft today, Boeing 777s, Airbus 330s, and so on, have autopilots — computers with programs that can fly the plane. The autopilot is a computer that manipulates an object in the physical world. To the computer, the airplane is an object. Some objects, in fact most objects that computers manipulate, are not physical objects. A bank transaction is an exam- ple of an object that is not physical. There is a set of activities that can be called a transaction, there may be physical money that changes hands, and there is usually a paper record of the transaction; however, the transaction itself is simply a concept, or an idea. It is an object, but not a physical object. Whether an object exists in the physical world doesn’t matter much in terms of what happens inside a computer. To a computer, an object is simply something that can be represented by data in the computer’s memory and manipulated by computer programs. The data that represents the object is organized into a set of properties . Each property describes the object in some way. For example, the weight of an airplane, its location, the direction in which it’s facing, and so on are all properties of the airplane. A computer manipulates an object by changing some of its properties or
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 26

Alice chap 1 - 1 Chapter C5777 36525 8/12/05 1 11:37 AM...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online