Alice 2.0 - PowerPoint PPT Presentation

alice 2 0 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Alice 2.0 PowerPoint Presentation
play fullscreen
1 / 30
Alice 2.0
841 Views
Download Presentation
medwin
Download Presentation

Alice 2.0

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Alice 2.0 an introduction to computer programming

  2. Alice 2.0 • Part I: What is Alice? • Part II: Software Development • Part III: Elements of Programming • Part IV: Event-Driven Programming

  3. Part I: What is Alice?

  4. What is Alice 2.0? 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).

  5. Who should use Alice? Anyone interested in learning the underlying skills required for programming in most languages. And All of YOU lucky CS109 students in this class! 

  6. Why use Alice? 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. //c++ application int main(0) { char display[20]; getline (display,20,\n); cout>>display; return; }

  7. What type of programming does Alice teach? 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).

  8. Object Basics Objects have properties (description)

  9. Objects have methods (behaviors) Note: functions are a method that returns a value. Object Basics Method (code) to make beak open and close

  10. The Alice IDE (integrated development environment)orsimply put – The Alice Interface This is the work area for programming with Alice…

  11. The IDE Object Tree

  12. Now you know what Alice is…the end (Part I)

  13. Time to try out Alice…

  14. Part II: Software Development It’s not just Alice anymore.

  15. The Software Development Cycle 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.

  16. The Software Development Cycle 2. Implementation Phase In the Implementation Phase, the solution to the problem/task is coded to build the application.

  17. The Software Development Cycle 3. Testing Phase In the Testing Phase, the application is tested – Individual modules Combined modules Entire application

  18. The Software Development Cycle 4. Debugging Phase In the Debugging Phase, The errors and side effects (unwanted results) are corrected.

  19. The Software Development Cycle 5. Documentation 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

  20. Now you know the software development cycle…the end (Part II)

  21. Part III: Elements of Programming

  22. Programming Rule #1 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) and proceed to the bottom (end).

  23. Key Programming Commands Selection/Branching – if/else (decision point or multiple points) milk Do you want a glass of milk? Make glass of milk choc Make c straw Make s Make plain

  24. Key Programming Commands Repetition/Looping – loop & while (repeating a task) Loops can be pre-test, or post-test

  25. Key Programming Commands Are you Boolean Logical? Boolean values are easy, as there are only 2. 0 – off/false 1 – on/true Logic Operators: ==, <,<=, >,>=, !=

  26. Now you know the key elements to programming…the end (Part III)

  27. Part IV: Event-Driven Programming In order to cause an “event” to occur – the user must invoke the “event trigger”.

  28. Events & Methods 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”.

  29. Adding a Billboard • Billboards are used in Alice to list keyboard controls (event triggers) available to the user. • Create the control billboard using Paint • Use a textbox in Paint to list the commands of your Alice World • Save the file as a .jpg • Import and use the file as listed on pages 220 -223

  30. Time to try out Alice…and explore the world of programming!