{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Alice chap 1 - 1 Chapter C5777 36525 1 11:37 AM Page 1 AN...

Info icon This 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: 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. 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. Load and play an existing Alice world. Create a new Alice world by adding objects to a blank world, positioning them, and using simple methods to animate those objects. 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
Image of page 1

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

View Full Document Right 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 some of the properties of its sub-parts.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern