1 Fall 2009ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique shown in text) Directed.

Slides:



Advertisements
Similar presentations
Decision Structures Chapter 4. Chapter 4 Objectives To understand: o What values can be stored in a Boolean variable o What sequence structures are and.
Advertisements

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland Modified by Serita Scott Further modified by Suzy Crowe.
Fall 2007ACS-1805 Ron McFadyen1 Ch 7 Loops Alice has two control structures for controlling the repeated execution of statements Loop While.
Fall 2009ACS-1805 Ron McFadyen1 Ch 7 Loops Alice has two control structures for controlling the repeated execution of statements Loop While.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
Xin November 22, Exercise start Skater turns towards skater2 Skater2 turns towards skater Skater moves to pose 2 Skater2 moves to pose 2 Bunny move.
Programming in Alice Chapter 2. Today’s Agenda Designing a Program Writing Methods Executing Instructions Simultaneously Comments Tips for Setting Up.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 5 Interactive Programs.
1 Fall 2008ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 7 Repetition.
Fall 2007ACS-1805 Ron McFadyen1 Ch 7 Loops Alice has two control structures for controlling the repeated execution of statements Loop While.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming - Putting Together the Pieces.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 8 Recursion.
Creating an Animation Program Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique, commonly.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 4 OO Programming Concepts.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming.
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Creating An Animation Program Alice Web Design Section 8-4.
Animation Programs: Scenarios and Storyboards Alice Web Design Section 8-3.
Storyboards in Alice Summer 2010 Prof. Susan Rodger.
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Four Fundamental Pieces Instruction Control Structure Function Expression.
Programming in Java Unit 4. Learning outcome:  LO2: Be able to design Java solutions  LO3: Be able to implement Java solutions Assessment criteria:
Alice Program Design and Implementation. Scenarios and storyboards The previous magician example illustrated a simple storyboard which depicts a scenario.
Classes, Objects, and World-level Methods Alice. Larger Programs As you become more skilled in writing programs, you will find that programs quickly increase.
1 Fall 2007ACS-1903 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the.
Animation Programs: Scenarios and Storyboards
Mathematical Expressions, Conditional Statements, Control Structures
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops Susan Rodger Duke University July 2011.
Creating an Animation Program
Fall 2009ACS-1805 Ron McFadyen1 Chapter 2 Program Design & Implementation.
Storyboarding and Program Design Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique,
Today’s Agenda 1.Collect Pre-Lab 3 2.Alice Programming Assignment 3.Built-in Functions 4.Expressions 5.Control Structure 6.Assign pair programming teams.
Programming: Simple Control Structures
Programming: Simple Control Structures MMP 220 Multimedia Programming This adapted material was prepared for students in MMP220 as as part of a curriculum.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 2 Creating Your First Animation (An Introduction to Programming)
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Obj: Programming: Simple Control Structures HW: Read section 3 – 2 AC3 D2 Do Now: 1.Log on to Alice. Open the file firstEncounter.a2w located in the folder.
Animation Programs: Scenarios and Storyboards Alice.
Alice in Action with Java Chapter 4 Flow Control.
Programming: Simple Control Structures Sec 46 Web Design.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-1 Lecture Objectives To understand: –what values can be stored in a Boolean.
Program design and implementation Sept 7, 2010 – Day 2 Object-oriented Programming thru Video Games TIDE 1840 Harry Howard Tulane University.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Programming in Alice Chapter 2.
Programming: Simple Control Structures
Programming: Simple Control Structures
Transition to Code Upsorn Praphamontripong CS 1110
Simple Control Structures
Programming Fundamentals
Chapter 5 Structures.
Programming: Simple Control Structures
Creating an Animation Program
MSIS 655 Advanced Business Applications Programming
Programming: Simple Control Structures
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Creating an Animation Program
Animation Programs: Scenarios and Storyboards
LabVIEW.
Programming: Simple Control Structures
Programming: Simple Control Structures
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Simple Control Structures
CSC1401 Manipulating Pictures 2
Programming: Simple Control Structures
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Presentation transcript:

1 Fall 2009ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique shown in text) Directed lines indicate flow of execution UML activity diagrams (an OO technique) UML is an OO standard for diagramming for OO systems Directed lines indicate flow of execution

2 Fall 2009ACS-1805 Techniques for designing code Do the following steps in order alien moves up alien says "Slithy toves?" robot's head turns around robot turns to look at alien Do together robot moves toward the alien robot legs walk alien moves down If robot is shorter than rock robot’s neck moves up robot’s neck moves down robot turns to face the camera robot blushes robot says “Houston, we have a problem!” A storyboard in text form:

3 Fall 2009ACS-1805 Flowchart for Action Sequence Action 2 Action 1 A simple sequence of actions. Looks the same in UML. …

4 Fall 2009ACS-1805 Action Sequence A simple sequence of actions is a Do in order structure in Alice

5 Fall 2009ACS-1805 UML for Parallelism Action nAction 1 If a set of actions are to be done at the same time they can be represented in a UML activity diagram as …

6 Fall 2009ACS-1805 Text Flowchart Action nAction 1 If a set of actions are to be done at the same time they can be represented in a flowchart as …

7 Fall 2009ACS-1805 Parallel Set of Actions A Do together structure in Alice specifies that certain actions are to be done at the same time… i.e. in parallel

8 Fall 2009ACS-1805 Flowchart for If/Else expression action(s) when falseaction(s) when true false true An if/else results in one of two actions being executed depending on the truth or falsity of some expression

9 Fall 2009ACS-1805 UML for If As a UML activity diagram [false expression] [true expression] Actions for false expressionActions for true expression

10 Fall 2009ACS-1805 If/Else expression

11 Fall 2009ACS-1805 Flowchart for Loop index < limit? Loop action(s) false true Loop action(s) executed while an index goes from 0 up to a limit Set index to 0 Increment index

12 Fall 2009ACS-1805 UML for Loop Loop action(s) [index >= limit] [index < limit] Loop action(s) executed while an index goes from 0 up to a limit Set index to 0 Increment index

13 Fall 2009ACS-1805 Loop Loop action(s) executed while an index goes from 0 up to but not including a limit *Also: see the more complicated version of loop Need to build this expression

14 Fall 2009ACS-1805 A UML diagram for Robot Discovering Alien Alien moves up Alien says “Slithy toves?” Robot turns head around Robot faces alien Alien moves down Robot faces camera Robot blushes Robot says “Houston, we have a problem!” Robot moves 1m towards alienRobot leg movesRobot other leg moves Index  1 Limit  distance between alien and robot Increment index [Index < limit] [Index >= limit] Need to modify this to accommodate the spider robot moving its head up/down as done on pages 69-71