Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs.

Similar presentations


Presentation on theme: "Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs."— Presentation transcript:

1 Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs. 9.2 Understand and use objects. 9.3 Explain how sequence, selection, iteration are building blocks of algorithms. 9.5 Use various debugging and testing methods to ensure program correctness. 9.6 Describe a variety of programming languages used to solve problems. 9.7 Incorporate music and art to enhance creativity in projects.

2 What is Alice A modern programming tool –purpose of tool, learn how to program, write algorithms and program animiations –3-D graphics –3-D models of objects Animation –Objects can be made to move around virtual world (a simulation or a video game. Alice is free. Alice is written in Java –www.alice.orgwww.alice.org

3 Memory Management Alice automatically manages memory But, writing and testing an animation is an intense load on the computing system –a crash can occur. Best solution: Alice (the program) reminds you every so often so save your work save your programs often! if working in lab when you logout the computer is wiped -> save to your account or to a backup system such as a memory stick

4 The World Alice Programs / Movies take place in a virtual world When you start a new world in Alice you select the background The world consists of a sky and the ground Can’t be changed after creating the world the world is not infinite

5 Details area Shows methods available for objects. You can create new methods Object Tree Contains a list of objects in the world Events Area - when you wants things to happen (when to make objects do things. Editor Area - put your program code together World Window – shows world you are building

6 Objects in Alice Objects already exist. Hundreds of them

7 Objects What is an object? –collection of data and operations in which data can be accessed and modified. Objects have two things: State & Behavior State - has a name, has properties-width, height, color, location, age, id# Behavior - associated actions it can perform tasks it can carry out – things it knows how to do ((barking, fetching, wagging tail).

8 Where Do Objects Come From? They are pre built –creating 3D objects is another area of computing and graphic design Sources of 3D objects – the local gallery that comes with the software – Alice web gallery How are objects added to the world? http://www.alice.org/index.php?page=gallery/index

9 Objects are categorized into classes Each objects is an instance of the class All objects in a class –have the same properties –generally can perform the same tasks Penguins Dogs Skipper Kowalski Private Snoopy Odie Ren Opus Rico Class is like a cookie cutter Cookie Cutter (class) makes objects Like it.

10 Classes & Objects Class - a template that describes the state and behavior associated objects (instances) of that class. Instance - the actual object created at runtime. Lassie would an instance of the dog class. instantiate - to create an object from a class

11 Behaviors of objects penguin class Behaviors of an object are the methods (actions) it can perform. Located under the methods tab.

12 Properties of objects penguin class Properties of an object are the things it knows about itself and they are stored in variables. Located under the properties tab

13 Adding Objects Click on the green “Add Objects” button World expands and local gallery displayed

14 Adding Objects Local gallery divided into a directory based on subject add instances of objects to world by –dragging and dropping or –click on object and select add instance option

15 Objects in the World penguin classpenguin objects in a virtual world Instances of the penguin class

16 Objects in the World The Objects that are present in the current world are listed in the Object Tree The top left panel in the Alice programming environment Every world comes with a light, a camera (point of view for the movie when played), and the ground

17 Object Dimensions Properties it knows: Objects in Alice worlds are 3 dimensional height width depth

18 Object Position Objects – are positioned in 3-D space – Have six degrees of freedom (directions of movement)

19 Methods: programmed procedure that is defined as part of a class and included in any object of that class.class object Ice Skater Object Two methods parameter

20 1. What is a method: Organized block of code that will perform a specific task. 2. What is a parameter: Extra information that a method needs to execute. Parameter is the ( ) The data inside the parameter is called arguments. (forward, 3) Method name

21 Changing arguments in the parameter You change the parameter information by clicking on the argument you want to change and selecting the amount or use other to type in an amount.

22 Exercises Log on to Alice. Complete the ice Skating tutorial in Alice.

23 Complete Sequential Program Complete the program Maze Sequential Programming.


Download ppt "Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs."

Similar presentations


Ads by Google