Alice 2.0 an introduction to computer programming Alice 2.0 Part I: What is Alice? Part II: Software Development Part III: Elements of Programming Part IV: Event-Driven Programming Part I: What is Alice? What is Alice 2.0? It is a computer application...
an introduction to computer programming
It is a computer application...
created by Carnegie Mellon University,
to “teach” computer programming.
Alice 2.0 is designed to create computer applications –
(i.e. build programs).
Anyone interested in learning the underlying skills required for programming in most languages.
And All of YOU lucky CS109 students in this class!
Why not just jump into C++ or Java?
Alice makes learning programming easier…
removing the challenges of programming syntax,
and “debugging” is made easier with visual cues.
Alice utilizes the concepts of OOP (Object Oriented Programming),
and Event Driven Programming
(i.e. an “event trigger” causes a series of commands/instructions to be exectuted).
Objects have properties (description)
This is the work area for programming with Alice…
It’s not just Alice anymore.
1. Design Phase
In the Design Phase, information is gathered to determine the task/problem to be solved by the application.
The task/problem is broken into smaller tasks, called modules.
Then a “plan of attack” is created.
2. Implementation Phase
In the Implementation Phase, the solution to the problem/task is coded to build the application.
3. Testing Phase
In the Testing Phase, the application is tested –
4. Debugging Phase
In the Debugging Phase,
The errors and side effects (unwanted results) are corrected.
Finally, once the application works as required by the Design Phase – the application and its workings are documented –
for users of the application
for future programmers to modify the application
Algorithm: A step by step method for solving a problem
Programs are algorithms created to solve problems.
Thus, programs are linear –
They start at the top (beginning)
proceed to the bottom (end).
Selection/Branching – if/else (decision point or multiple points)
a glass of
Repetition/Looping – loop & while (repeating a task)
Loops can be pre-test, or post-test
Are you Boolean Logical?
Boolean values are easy, as there are only 2.
0 – off/false
1 – on/true
==, <,<=, >,>=, !=
In order to cause an “event” to occur – the user must invoke the “event trigger”.
The event – chicken rolling and changing colors
(as defined by the method “Silly Chicken”)
“occurs” when the “event trigger” (mouse click on chicken)
is detected by the “event listener”.
Note: The Silly Chicken method is known as the “event handler”.