Looking at:. WHY USE . “Myth” of programming is too hard out of the equation Students have a visual of what “their” program is doing Syntax frustration is eliminated Allows for more complex algorithm development earlier. GETTING STARTED. FREE: Download www.Alice.org
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
WHY USE • “Myth” of programming is too hard out of the equation • Students have a visual of what “their” program is doing • Syntax frustration is eliminated • Allows for more complex algorithm developmentearlier
GETTING STARTED • FREE: Download www.Alice.org • Installation Options: • load to the computers hard drive and have students save their “worlds” on a flash drive • Save Alice and “worlds” on a flash drive
P.E.--FRIEND OR FOE • Students can spend too much time designing the “perfect” world….. • Remember the purpose is…. • Programming • Problem solving
FRAME OF REFERENCE • The yellow box that surrounds the object is called the “bounding box” • Where the lines intersect is the objects center point • Every object has it’s own frame of reference • Forward, backward, up, down, left, right
FINDING THE OBJECT? • Use Scroll to center objects • Use Zoom to get a bigger point of view
INITIAL SETUP • Add bee • Web galleryAnimalsBugs • Add flowers • Local galleryNatureFlower class • Move flowers below the ground • How do you simulate “growing”? • Move down underground and then disappear
GROWING FLOWERS • The flowers need to appear as if they are growing • flowers move up • get bigger • become visible • Flowers need to be invisible first • click on each flower • click the properties tab • Opacity change from 100% to 0%
A PROGRAM IS BORN • Solution to the scenario is now composed in the method and event editors.
THE SCENARIO REVISITED • A bee is above a green field • Daisies begin growing • The bee flies to the nearest daisy and devours it (yes, we have a mutant bee) • Have the bee turn to face the camera, the flowers begin to grow and the bee buzzes from flower to flower.
METHODS • Select the world object from the object tree • All worlds start with a single method referred to “my first method: • This would be the main in a Java program
ADDING METHODS • Methods/commands are added by dragging and dropping from the detail panel to the code editor • Select the bee from the object tree • Drag the turn to face method into the code editor
ADDING PARAMETERS • When adding a method to the code editor if a parameter is required a menu pops up to select the arguments. • For this scenario chose the camera
MORE PARAMETERS • Your program begins: “my first method” should look like this: • Click on the “more” options to see the “other” parameters that can be changed.
TESTING THE PROGRAM • Click the play button to test your program/view the output What will execute? “my first method” because it is the only event at this point of the program
BEHAVIORS • The bee will buzz around while the flowers grow. • Methods are either world level or class level • World level methods: can be used by any object • Class level methods: are used by only ONE object
CREATE A METHOD • Create a buz method • Select the bee from the object tree and click on the create method button in the details panel.
BUZ METHOD • A naming window pops up for the new method • Illegal names will appear in RED • Notice a new tab pops up in the code editor next to your “my first method” • Should your method have parameters?
ADDING PARAMETERS • How far to buz and how long to buz Click on the create new parameter button in the code editor
ADDING PARAMETERS • Name the parameter and choose from the list the data type • distance NUMBER • time NUMBER • The buz method now requires 2 parameters
ADDING CODE to BUZ • To buz the bee will move up and then move down • Drag the bee ROLL command into the hop method and fill in the parameters (up) • Drag another move command (down)
MORE CODE TO BUZ • Change the duration of the move to half of the time parameter • Click on the triangle to open the drop down menu • Select math and divide time by 2
MY FIRST METHOD AGAIN • The bee should buz while the flowers grow • Initially the flowers are below the ground and invisible • The flowers will grow by • Appearing above ground • Resizing • Making them visible
A NEW METHOD: GROW • Three different ways to create grow: • You could repeat the actions to grow for each flower and put it in a method • Could make a class level method and then save as a new type of flower • Could make a world level method and send each flower as a parameter.
METHOD: GROW • Create a new world level method named grow • Add a parameter type object • Make sure you are on the world tab and that you choose the correct TYPE of parameter.
COMMAND STRUCTURES • Move up, resize, make visible must happen at the same time. • The default in programming is top to bottom in order • Do together is a primitive that executes commands together • Drag and drop this structure into the grow method
GROWING FLOWERS • A Do together Block will execute together • Drag and drop the parameter (flowerToGrow) into the Do together block and select the methods to move up and resize • Change the duration?
BECOMING VISIBLE • Choose any object from the object tree • Choose the properties tab • Drag and drop the OPACITY property into the program and change to 100%
Visibility • Replace the object (Bee) with the parameter (flowerToGrow).
REVISITING MY FIRST METHOD • The bee can buz and the flowers can grow (The first part of the storyboard is complete) • Now have the bee turn to face the camera and have the bee buz and the flowers to grow at the same time Do together
BUZZING & GROWING • Drag the grow method into the Do together block for each flower created.
Connexion au compte
Connectez-vous pour publier votre contenu sur SlideServe.