Monkey See, Monkey Do. Important Turn on Java-like syntax option in Alice, if is not on already.

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Visual Lists By Chris Brown under Prof. Susan Rodger Duke University July 2012.
How SAS implements structured programming constructs
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Intro to Programming Algebra-Geometry. Computer Programming? What is programming? The process of writing, testing, and maintaining the source code of.
True or false A variable of type char can hold the value 301. ( F )
Selection Statements choice of one among several blocks of code Java supports 3 kinds of selection statements: if statement – selects one block or leaves.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 4: Control Structures I (Selection)
Program Design and Development
Alice in Action with Java
Slides prepared by Rose Williams, Binghamton University Chapter 3 Flow of Control Loops in Java.
Loops Repetition Statements. Repetition statements allow us to execute a statement multiple times Often they are referred to as loops Like conditional.
Calvin and Hobbes Teach Properties and Functions Created by Daniel MacDonald under the direction of Professor Susan Rodger Duke University June 2013.
METHODS!.  A method is a sequence of instructions or behaviors that will be carried out when requested.  You can use them to create new methods so that.
Functions and Conditionals in Alice 1 Stephen Cooper Wanda Dann Barb Ericson September 2009.
Creating Functions Deborah Nelson Duke University Professor Susan Rodger July 22, 2008.
01-Intro-Object-Oriented-Prog-Alice1 Barb Ericson Georgia Institute of Technology Aug 2009 Introduction to Object-Oriented Programming in Alice.
Branching and Looping Examples, cont’d. Remember the generic triple jump world…
Programming With Alice. Alice Free Java based, 3D programming tool Enables the manipulation and interaction of 3D objects Can also.
Welcome! The Topic For Today Is…Review for Test. Your Topic Basics of Programming Control Statements Programming Concepts InteractionAlice Concepts 200.
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
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.
Continuous February 16, Test Review What expression represents the zip car eligibility rules of at least 18 years old and no incidents?
Teaching a character to walk in more than one world: Parameters and Inheritance. By Lana Dyck under the direction of Professor Susan Rodger Duke University.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
By Melissa Dalis Professor Susan Rodger Duke University June 2011 Multiplication Table.
CPS120: Introduction to Computer Science Decision Making in Programs.
A Simple Quiz: Ask User Functions. By Lana Dyck under the direction of Professor Susan Rodger Duke University June 2009, added Part 2 July 2011.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 ‏ Control Structures.
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
Mathematical Expressions, Conditional Statements, Control Structures
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
Java Programming Fifth Edition Chapter 5 Making Decisions.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
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.
Alice. Terms test 6:30pm Tuesday 8th April, 2003 MLT1 A - J PLT1 K - S PLT2 T - Z.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 2: Control Structures (Selection & Repetition)
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
1 Quiz Show Programming Terms. 2 Alice - 3D Virtual Programming Vocabulary Quiz Board Chapter 1 Chapter 2a Chapter 2b Chapter 3 Chapter 4 $100 $200 $300.
 Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
1 Sections 3.1 – 3.2a Basic Syntax and Semantics Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
A Simple Quiz for Alice 3.2:
Chapter 3: Decisions and Loops
Welcome to Computer Science Jeopardy
Control Structures
Microsoft Visual Basic 2005 BASICS
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Organizing common actions
Michelle Venable-Foster Barb Ericson Jan 2007
A Simple Quiz for Alice 3.2:
T. Jumana Abu Shmais – AOU - Riyadh
Items, Group Boxes, Check Boxes & Radio Buttons
Chapter 8: More on the Repetition Structure
Using Functions
Introduction to Object-Oriented Programming in Alice
Using Lists and Functions to Create Dialogue
Relational Expressions
Restricting Events Creating Conditional Events in Alice By Henry Qin
Presentation transcript:

Monkey See, Monkey Do

Important Turn on Java-like syntax option in Alice, if is not on already.

Revision - Objects Our world is made up of objects These objects are computer models of real world objects They have properties (variables) that define the state of that object They have behaviours they can act out These behaviours are a list of instructions or code To manipulate our objects, we must manipulate an object’s variables or have it carry out actions.

Alice Objects All Alice objects are 3D models that are visible in your World Most Alice methods/behaviours are animations that you wish these models to carry out You can manipulate the starting positions of objects by mouse Animate characters by writing and calling methods

Alice Objects Alice objects come with many default variables and methods – default methods cannot be edited Alice provides a number of default boolean expressions - called questions Alice objects can be made up of a number of sub-objects. These can be manipulated independantly

Revision - Methods A method is a block of code (list of instructions) By default, the code is executed one line at a time We can change this using execution control structures Methods can have parameters

Alice Methods Alice methods also contain a block of code Code is written by dragging tags from one location and dropping in another We can create temporary variables for use during method execution We can define paramters for our method’s execution

Revision – IF/ELSE & boolean statements IF statements allow our computer to make a choice We use boolean statements or questions Outcome dictates which block of code executes

Alice IF statements Drag the IF tag from the top of method editing window Drag in a question Drag in code to fill in the other two outcomes

Revision – loop A loop statement loops a number of times The code is repeatadly executed

Alice loop Drag the loop tag from the top of method editing window Choose how many times you want the code to execute Drag in code to fill in the other two outcomes

Revision – While While statements loop until the testing condition is false This condition is tested prior to the next loop executing

Alice While loop Drag the while tag into the code area Drag in a question Drag in code to fill in the while loop Make sure while loop ends at some stage

Revision – Parrallel Normal execution is one line at a time By using the do together command, we can execute multiple lines at once In Java, multiple execution of code is possible – although somewhat difficultl

Dot notation If you have correctly set Java-like syntax, you will see dot notation Monkey.head is the Monkey object’s head object Monkey.head.color is the Monkey object’s head object’s color This notation allows the computer to work out who owns what