Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to programming Created by Dr. Randy Pausch

Similar presentations


Presentation on theme: "An introduction to programming Created by Dr. Randy Pausch"— Presentation transcript:

1 An introduction to programming Created by Dr. Randy Pausch
Alice An introduction to programming Created by Dr. Randy Pausch

2 Alice Programming Language
Created by Dr. Randy Pausch (known for “The Last Lecture) Carnegie Mellon University, Pittsburgh Free for downloading from Installed on most lab machines around campus – Instructional Software / Alice

3 IDE Interactive (or integrated) development environment Object tree
Editor Event window Window of the world Details about the current object

4 Process for starting a world
Click green button – “Add Objects” Choose some objects to add to world Can have more than one instance of a class (an object), they will be numbered fish1, fish2, fish3… Don’t spend ALL your time doing this! Click DONE when finished adding You can come back later and add more

5 To ‘write’ a program Click on an object, either in object tree or in picture of world Choose a method from the list available and drag to the editor window – it will turn green when you can drop it Put it in the sequence you want executed Answer questions about arguments for the method, if any Alice makes it hard to make a syntax error!

6 To translate and execute a program
Click the Play button in the upper left hand corner of the IDE Remember to close the play window or click the stop button before going back to the editor window

7 Control Structures Look just below the Editor window – there is a bar there You can drag those things into your program also Loop and While are “repetition” structures If/Else is the “selection” structure “Sequence” is shown by the order the methods are used in the Editor window

8 Functions vs Methods This is the terminology used by Alice
Not quite same as OOP Functions ask questions and give back answers “how far?” “how big?” “is near?” “is not near?” Methods are actions “move” “turn” “talk”

9 Saving Alice worlds File menu “Save World” option
You can browse to where you want the world saved Extension will be “a2w” “Alice version 2 world” Automatically makes a folder called “backups of “worldname The more objects the bigger the world!

10 Loading in a world you made
You CANNOT double-click on the file where the world is to run it You must run Alice.exe first Then from the File menu, use “Open World”


Download ppt "An introduction to programming Created by Dr. Randy Pausch"

Similar presentations


Ads by Google