1 / 10

Alice

Alice. An introduction to programming Created by Dr. Randy Pausch. Alice Programming Language. Created by Dr. Randy Pausch (known for “The Last Lecture) Carnegie Mellon University, Pittsburgh Free for downloading from www.alice.org

chunter
Télécharger la présentation

Alice

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 www.alice.org • 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”

More Related