Download presentation
Presentation is loading. Please wait.
1
Alice Programming Assessment: Inheritance
Alex Boldt Under the direction of Professor Susan Rodger Duke University June 2015
2
Assessment Overview This assessment is designed to go over how to make custom Classes in Alice with their own methods and events. It should take about 15 minutes to complete this challenge. Before attempting this challenge please complete the tutorial: “Creating a Fancier Chicken-Inheritance”. Add specific topics that they need to know
3
Starter World Open the InheritanceAssessment.a2w world
You will see that there are already objects and methods written. The frog has a method called frog.jumpOver that we will be concerned with. Press play and view the current state of the world
4
The Problem Nothing happens, because there are no events!
The goal is to create a frog with a built-in event that allows the frog to jump over a parameter object when the spacebar is pressed. In this world, that parameter will be the bunny.
5
Modifying the frog The only method of concern is frog.jumpOver, which is already written for you. First, we’d like to make the frog bigger, because the default model is very small. Resize the frog to three times its current size.
6
Modifying the frog Create a frog event that called frog.jumpOver whenever the spacebar is pressed. For the purposes of this world, the parameter to jump over will be the bunny. Rename the frog to “jumpingFrog”.
7
Saving the jumpingFrog
Save out the jumpingFrog to anywhere on your computer. Just make sure you know where it is! If the jumpingFrog jumps over the bunny when the space bar is pressed, then you’ve finished the assessment!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.