Introduction to Alice
•What is Alice?
•Object Oriented Definitions
•What Does it Look Like?
•Where Can I Use it?
What is Alice ?
 Alice ( is a 3-D
Interactive Graphics Programming Environment
 Developed at Carnegie Mellon
 Alice is built on top of the programming
language Python
 The goal of the Alice project is to make it easy
for novices to develop interesting 3-D
environments and to explore the new medium of
interactive 3-D graphics
 A tool for teaching concepts of fundamental
 Objects
 Classes
 Methods
 Events
What is Alice ?
 Alice is primarily a scripting and prototyping
environment for 3-D object behavior
 3-D models of objects (e.g., animals and
vehicles) populate a virtual world in Alice. By
writing simple scripts, Alice users can control
object appearance and behavior
 Presents Object-Oriented Design
 A software design method that models the
characteristics of abstract or real objects using
classes and objects
What is Alice ?
The Alice Approach
 Uses 3D graphics to engage students
 Has a “smart” drag-and-drop editor that
prevents syntax errors
What is Alice ?
Key Alice Features
 Makes objects something students can
see and relate to
 Has a java syntax mode to ease the
transition to C++/Java/
What is Alice ?
Schools using Alice 2004-2005:
• Bucknell University
• Carnegie Mellon
• Clemson University
• Colorado School
of Mines
• Community
College of
• Cornell University
• Duke University
• Ithaca College
• Plymouth State
• Saint Joseph's
• Saint Lawrence
• San Diego State
• University of
• University of Illinois
• University of
• Virginia Tech
Object Oriented Definitions
 Definition: An object is a software bundle of
variables and related methods
 Object is defined by its properties and its
 Real-world objects share two characteristics:
 State and Behavior
• For example, dogs have state (name, color,
breed, hungry) and behavior (barking, fetching, and
wagging tail)
Object Oriented Definitions
 Software objects are modeled after real-world
objects in that they too have state and behavior
 A software object maintains its state in one or
more variables
 A variable is an item of data named by an
 A software object implements its behavior with
 A method is a function (subroutine) associated
with an object
Object Oriented Definitions
 Definition: A class is a blueprint that defines the
variables and the methods common to all
objects of a certain kind
 In the real world, you often have many objects
of the same kind
 For example, your car is just one of many
vehicles in the world
 This means that car is one of the choices within
the vehicle class
Object Oriented Definitions
 Using object-oriented terminology, we say that
your car object is an instance of the class of
objects known as vehicles
 Vehicles have some state (four wheels) and
behavior (accelerate, brake) in common.
 However, each vehicle's state is independent of
and can be different from that of other vehicles
Object Oriented Definitions
 Definition: A method is a piece of code that is
exclusively associated either with a class (called
class methods) or with an object (called instance
 Like a procedure in procedural programming
languages, a method usually consists of a
sequence of statements to perform an action, a
set of input parameters, and possibly an output
value of some kind
 The purpose of methods is to provide a
mechanism for accessing (for both reading and
writing) the private data stored in an object or a
Object Oriented Definitions
 Methods are essentially instruction sets for
 Consequently, rather than thinking a method is
just a sequence of commands, an OO
programmer will consider a method to be "an
object's way of providing a service" (its "method
of doing the job", hence the name)
 A method call is thus considered to be a
request to an object to perform some task
 Method calls are often modeled as a means of
passing a message to an object
Object Oriented Definitions
 For Example:
 The Drive method for a car would consist of
turning left ¼ and moving away for a distance of
10 meters
car.Drive ( )
No variables
Do in order
car turn left 0.25 revolutions
car move forward 10 meters
Object Oriented Definitions
 Definition: An event is an action or occurrence
detected by a program
 Events can be user actions, such as clicking a
mouse button or pressing a key, or system
occurrences, such as running out of memory
 Most modern applications are said to be
event-driven, because they are designed to
respond to events
What Does it Look Like ?
Where Can I Use it ?
 Computer Lab
 Alice is loaded on the computers in the
CCRI Academic Computer Lab
 Look for the Alice icon on the desktop or
under Programs from the Windows Start
 Download
•ALICE Programming software - can be
downloaded at
(download the most recent version)
•The download is 115 Megabytes so may be
difficult if you do not have access to a
broadband network.

Introduction to Alice