Programming With Alice. Alice Free Java based, 3D programming tool Enables the manipulation and interaction of 3D objects Can also.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Program Memory MIPS memory operations Getting Variable Addresses Advanced structures.
PIIT Computer Science Summer Camp - Alice July 10, 2012 Brenda Parker Computer Science Department MTSU.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
ABNIAC The following slide presentation is to acquaint the student with ABNIAC. The version used for presentation is the Java version, which can be found.
Monkey See, Monkey Do. Important Turn on Java-like syntax option in Alice, if is not on already.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Python Magic Select a Lesson: Why Learn to Code? Basic Python Syntax
CMPUT101 Introduction to Computing(c) Yngvi Bjornsson & Jia You1 Algorithm Discovery and Design Chapter 2 Topics: Representing Algorithms Algorithmic Problem.
Some revision.  Today, we will do some revision on: - ◦ booleans, and ◦ if statements.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Visual Basic: An Object Oriented Approach 3 – Making Objects Work.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
Adding Automated Functionality to Office Applications.
Unit Six Assignment 1 Chris Boardley.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Adapted from slides by Marie desJardins
Branching and Looping Examples, cont’d. Remember the generic triple jump world…
High-Level Programming Languages: C++
Execution Control with If/Else and Boolean Functions
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Data Structures & AlgorithmsIT 0501 Algorithm Analysis I.
Study Guide For Test Chapter 5, 6,& 7 Test is Friday, May 15th.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
COMPUTER PROGRAMMING. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may repeat code.
Coding Design Tools Rachel Gauci. What are Coding Design Tools? IPO charts (Input Process Output) Input- Make a list of what data is required (this generally.
Coding Design Tools Rachel Gauci. Task: Counting On Create a program that will print out a sequence of numbers from "1" to a "number entered”. Decision’s.
University of Windsor School of Computer Science Topics in Artificial Intelligence Fall 2008 Sept 11, 2008.
1 CSCI N201 Programming Concepts and Database 9 – Loops Lingma Acheson Department of Computer and Information Science, IUPUI.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
 2003 Prentice Hall, Inc. All rights reserved. 1 Basic C++ Programming.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Comp1004: Introduction III Java. Content How Java Works: The JVM Writing a Class in Java – Class – Member Variables – Method – Statement Magic incantations.
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.
Collision Theory and Logic
Introducing Instructions
Collision Theory and Logic
Programming: Simple Control Structures
10 | Programming with Transact-SQL
Programming: Simple Control Structures
Object Oriented Concepts -I
CS190/295 Programming in Python for Life Sciences: Lecture 1
Computer Programming.
CPS120: Introduction to Computer Science
T. Jumana Abu Shmais – AOU - Riyadh
Algorithm Discovery and Design
SME1013 PROGRAMMING FOR ENGINEERS
Coding Concepts (Basics)
Introduction to Problem Solving and Control Statements
Faculty of Computer Science & Information System
SME1013 PROGRAMMING FOR ENGINEERS
Programming: Simple Control Structures
ICT Programming Lesson 3:
Programming with Alice
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Spreadsheets, Modelling & Databases
An Introduction to Linux
ICT Gaming Lesson 2.
Basic Programming Concepts
LOOPS The loop is the control structure we use to specify that a statement or group of statements is to be repeatedly executed. Java provides three kinds.
If-Statements and If/Else Statements
Restricting Events Creating Conditional Events in Alice By Henry Qin
Presentation transcript:

Programming With Alice

Alice Free Java based, 3D programming tool Enables the manipulation and interaction of 3D objects Can also react to user input Everything is drag and drop Designed to teach programming at a basic level

Programming Concepts - Objects Objects are entities in your program Objects can be related to a real world (concrete) concept or an abstract one In Alice: All objects are concrete, 3D objects Objects can be given attributes and behaviour

Object - Car Me2Kuul

Programming Concepts – Variables Variables are pieces of data that store information about an object or method Objects use variables to describe their current state Methods use variables for a variety of purposes – State, temporary storage, calculations

Object - Car GR8 LAY Speed Engine size Other objects: Tires Number of Girls

Programming Concepts - Methods We define the behaviour of an object using methods Methods are a list of instructions that an object is suppose to perform when that method is “called” The method list of an object tells us what that object is capable of. Parameters can be used to tell a method how to carry out a particular behaviour

Programming Concepts – Parameters When a method is called, parameters can be given to the method at the same time They tell the method how to execute a particular behaviour Allows methods to be more general/useful

Object - Car No1Stud Speed Engine size Other objects: Tires Method List: Drive(how fast) Stop() PickupGirls(how many) CruiseAbout() Number of Girls

Variable Types Primitive Data – Text, number or boolean value (true or false) Object data – variable stores an actual object List – A list of object data or primitive data

Comments Comments allow us to add notes in our code to help us (and others) understand it The computer ignores comments Proper use of comments becomes more important as your programs get larger In both Alice and Java, comments are preceded by “//” e.g. //This is a comment

Question We have objects, methods and variables, how do we use this to get work done?

Remember: A program is just a list of instructions for the computer to execute. Your average program will: Call methods React to user input Update variables with new data i.e. Execute code

Typical Program – PseudoCode Drive(50)//Drive at 50km/h PickUpGirls(3) Cruise() Stop()

Programming Concepts – Execution Control There are many execution control structures we can use to aid us in our programs if/else While for loop

If/else We have used “if” statements in Excel If(boolean) do “Something” //True else do “Something else”//False In Java and Alice, we replace the “Something” with code Used for making decisions

Typical Program – PseudoCode if(speed<50) Drive(50) else Stop()

loop The basic loop loop(number of times) do “Something” As you expect, loops a number of times and then stops

Typical Program – PseudoCode Drive(50)//Drive at 50km/h loop(3) pickupGirls(1) Cruise() Stop()

While While is a looping structure While(boolean) //if false, stop looping do “Something” //over and over Will continue to execute the same code until the test fails

Typical Program – PseudoCode Drive(50) while(girls<3) PickUpGirls(1) Cruise() Stop()

For For is also a looping structure for(list) //for each item in list do “Something” Allows you to take a list of data and perform some action on each item

Sequential or Parallel Do in order vs do together Do in order – Execute each command one after another, next command must wait until the previous has finished Do Together – Execute all commands at the same time

Demo