CS320n –Visual Programming Problem Solving Case Study (Slides 6-3) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.

Slides:



Advertisements
Similar presentations
Visual Lists By Chris Brown under Prof. Susan Rodger Duke University July 2012.
Advertisements

Alice.
Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 3: Billboards, Events, Sounds,
CS320n –Visual Programming Class-level Methods and Inheritance – Part 1 Mike Scott (Slides 4-3-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger.
Class-level Methods Chapter 6. Class-level Method Is specific to a class of objects We can give a class new abilities/methods Only involves this one class.
Skater World: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger May 29,
Review of Chapter 4 Sections 1 and 2 World-level methods involve two or more objects break a large problem into smaller, logical units follow a design.
How Tall Are You? Introducing Functions By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made June 2014 by.
Class-level Methods and Inheritance MMP 220 Multimedia Programming This adapted material was prepared for students in MMP220 as as part of a curriculum.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
SETTING UP CAMERA VIEWS LESSON Setting camera views using objects, based on a lesson by Bella. Adventures in Alice Susan Rodger Duke University July 2013.
Rank Rank of an element is its position in ascending key order. [2,6,7,8,10,15,18,20,25,30,35,40] rank(2) = 0 rank(15) = 5 rank(20) = 7.
Programming: Simple Control Structures Part 1 – Conditional Execution Alice.
CS320n –Visual Programming Indefinite Loops (Slides 7-2) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Alice Programming Step 1:Design Copyright 2011 Wanda Dann, Don Slater, Steve Cooper.
CS320n –Visual Programming Random Numbers and Random Motion (Slides 6-3) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Text Chapters 1, 2. Sorting ä Sorting Problem: ä Input: A sequence of n numbers ä Output: A permutation (reordering) of the input sequence such that:
CS320n –Visual Programming Functions Mike Scott (Slides 6-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Alice Workshop Problem Solving with Alice 2 & Friends.
Introduction to Alice CS Honors Slides courtesy of Wanda Dann, Ithaca College.
Animation Programs Alice. Overview 4-step process for creating animations Step 1: Understand Problem Step 2: Design Step 3: Implementation Step 4: Test.
Alice Learning to program: Part 1 Scene Setup and Starting Animation by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke.
Shorter of two objects and changing color Functions, events and setting the color Susan Rodger, Duke University June 2008.
Making a Book Report in Alice by Jenna Hayes Under the direction of Professor Susan Rodger Duke University, June 2010.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
11.5 Distance & Midpoint Formulas Definitions Formulas & Examples Practice Problems.
Don Slater Wanda Dann Motion and Rotation Copyright 2012 Wanda Dann, Don Slater All rights reserved.
Storyboards in Alice Summer 2010 Prof. Susan Rodger.
Shorter of two objects and changing color V2 Functions, events and setting the color in sequence and randomly This is a modification of the Changing Color.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
CompSci 4 Chap 7 Sec 2 Apr 7, 2005 Prof. Susan Rodger Note: thanks to Wanda Dann and Steve Cooper for slide ideas.
Alice Programming Step 1:Design Copyright 2011 Wanda Dann, Don Slater, Steve Cooper.
Getting started with Alice Adapted from presentations by Jenna Hayes, Duke University Donna Gavin, UWP Computer Science and Software Engineering.
CS329e – Elements of Visual Programming Implementing Programs Mike Scott (Slides 2-2)
Alice Tutorial: Overview and Concepts Wayne Summers Columbus State U. 11/17/06.
CompSci 4 Chap 8 Sec 1 Nov 17, 2005 Prof. Susan Rodger Note: thanks to Wanda Dann and Steve Cooper for slide ideas.
Factoring Using the Distributive Property Chapter 9.2.
Program Development Cycle Modern software developers base many of their techniques on traditional approaches to mathematical problem solving. One such.
What we will do today Learn about functions in Alice.
CS320n –Visual Programming Introduction to Recursion (Slides 8-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
CS320n – Elements of Visual Programming Lists Mike Scott (Slides 9-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
CS320n –Visual Programming Advanced Recursion (Slides 8-2) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
CompSci 4 Chap 5 Sec 2 Oct 18, 2005 Prof. Susan Rodger Note: thanks to Wanda Dann and Steve Cooper for slide ideas.
CS320n – Elements of Visual Programming Sending Parameters to Event Handler Methods (Slides 5-2) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for.
Don Slater Wanda Dann Copyright 2012 Wanda Dann, Don Slater All rights reserved.
Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Alice Workshop More Precise Positioning Camera Marker One-shot methods Saving a world.
Programming: Simple Control Structures
Copyright 2008 Wanda Dann, Steve Cooper, Don Slater Alice Workshop Variables & Conditions.
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko under the direction of Professor Susan Rodger Duke University July 2013 Updates.
Distance Challenge By: Chris Brown Under the direction of Prof. Susan Rodger Duke University, January 2013.
CS320n –Visual Programming Definite / Counted Loops (Slides 7-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
CompSci 4 Chap 6 Sec 2 Sep 30, 2010 Prof. Susan Rodger “All your troubles are due to those ‘ifs’,” declared the Wizard. If you were not a Flutterbudget.
CompSci 4 Chap 4 Sec 3 Sept 23, 2010 Prof. Susan Rodger.
CompSci 4 Chap 10 Nov 22, 2005 Prof. Susan Rodger Note: thanks to Wanda Dann and Steve Cooper for slide ideas.
How Tall Are You? Introducing Functions for Alice 3 By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made.
CS320n –Visual Programming Execution Control with If / Else and Boolean Functions (Slides 6-2-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for.
Class-level Methods and Inheritance Alice. Class-level Methods Some actions are naturally associated with a specific class of objects. Examples A person.
CS320n – Elements of Visual Programming List Search Mike Scott (Slides 9-2) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Professor Susan Rodger
CS320n – Elements of Visual Programming
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko
Making Objects Move in Unison: Using Lists
CS320n –Visual Programming
Making Objects Move in Unison: Using Lists
CS320n –Visual Programming
How Tall Are You? Introducing Functions
Class-level Methods and Inheritance
Presentation transcript:

CS320n –Visual Programming Problem Solving Case Study (Slides 6-3) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.

Visual ProgrammingProblem Solving Case Study2 What We Will Do Today Look at a complicated problem Discuss different ways of solving it Learn some techniques in Alice Practice Writing methods and functions

Visual ProgrammingProblem Solving Case Study3 Problem to Solve Create a scene with 3 animals standing in a row resize each of them from 0.5 to 3 times its original size Find the animal that is tallest and spin it once to the right and once to the left Sort the animals by their height smallest on the camera’s left, tallest on the camera’s right Display message “In order” any time the animals are sorted

Visual ProgrammingProblem Solving Case Study4 Objects in the World Animals – Penguin, Joey, White Rabbit –careful to pick animals whose center point is at their feet –challenging if center point is higher –position animals 1 meter apart (use move to and move methods in set up) Need some way to track position –fixed objects (balls) 3D text “In Order!” in scene but invisible

Visual ProgrammingProblem Solving Case Study5 Initial Scene tennis ball is position 1, toy ball is position 2, volleyball is position 3 Use these as fixed points of reference

Visual ProgrammingProblem Solving Case Study6 Storyboard check if animals are sorted resize animals check if animals are sorted make tallest spin sort animals display in order (assuming sorted)

Visual ProgrammingProblem Solving Case Study7 world.my first method

Visual ProgrammingProblem Solving Case Study8 make Tallest Animal Spin Around find out which is tallest spin it around right, then spin it around left create a function to determine which of the three things is tallest

Visual ProgrammingProblem Solving Case Study9 tallest Of Three How do we do this? It’s not so bad for 3 but if there were more it would become too complicated

Visual ProgrammingProblem Solving Case Study10 check If Sorted By Height How do we check if items are sorted by increasing height? Check if object in position 1 is shorter than object in position 2 and if object in position 2 is shorter than object in position 3? How do we know which animal is in which position?

Visual ProgrammingProblem Solving Case Study11 which Object Is Closest To

Visual ProgrammingProblem Solving Case Study12 sort Animals By Height How? More than one way? Again, if we get more than 3 becomes very complicated, very quickly

Visual ProgrammingProblem Solving Case Study13 One Way determine which thing is in which position determine which thing is tallest if tallest is not in position 3, swap tallest with thing in position 3 then check if the thing in position 2 is taller than the thing in position 1 –if not then swap those 2 animals next to each other started out 1.5 meters apart –or could use distance to the left / right function

Visual ProgrammingProblem Solving Case Study14