Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.

Slides:



Advertisements
Similar presentations
Mike Scott University of Texas at Austin
Advertisements

Objects and Properties Alice. Objects in Alice Objects already exist. Hundreds of them.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
CS320n – Elements of Visual Programming Introduction to Alice Mike Scott (Slides 1-1)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object, Object- Relational, and XML: Concepts, Models, Languages,
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice.
Alice: A Visual Introduction to Programming Chapter 1 Part 2.
Programming in Alice Chapter 2 Part 2. Events Editor Identifies what method is executed (run) when the “Play” button is hit 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Part 1 Conditionals and Loops.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Princess & Dragon Part 4: Breathing Fire—Adding Effects to Alice By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley This week: Whew!!! The last homework was tough! The homework for this week.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
Programming Logic Program Design. Objectives Steps in program development Algorithms and Pseudocode Data Activity: Alice program.
Topics Introduction Hardware and Software How Computers Store Data
Microsoft Visual Basic 2005: Reloaded Second Edition
Programming Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1 Introduction to Computing and Programming.
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Twelfth Edition.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Creating An Animation Program Part 2 Alice. Method A segment of program code (instructions) that defines how to perform a specific task.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
CS329e – Elements of Visual Programming Implementing Programs Mike Scott (Slides 2-2)
Alice: A Visual Introduction to Programming Chapter 1 Part 2.
Alice Tutorial: Overview and Concepts Wayne Summers Columbus State U. 11/17/06.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Where are we? Alice is a “toy” language Fundamentals are exactly like “real”
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Alice and Algorithms Chapter 1 Part Reasons to Program The joy of programming To create a tool To use your creativity abilities For non programmers.
Alice Workshop November 2009 By: Kim Glavan New Lenox School Dist #122.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Review for test! Alice Chapter 1&2 Test is tomorrow! - March 26 th March 25th.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Chapter 1: Introduction to Alice and Objects
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Setting Up the Initial Scene. Problem Solving in Alice Set up the initial scene in a new world The princess example Setting up the initial scene.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Chapter 1:
Beginning Animation. Storyboard An Invitation to Dinner 1.Marlin and Dory (two small fish) are swimming and talking. 2.A shark (Bruce) swims up behind.
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.
Introduction to Programming and App Inventor. Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor.
Setting Up the Initial Scene
Introduction to Visual Basic 2008 Programming
Getting started in Alice
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Alice and Objects
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition by Tony Gaddis Chapter 1: Introduction to Alice and Objects

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Objectives To understand: the differences in dimensions between 2D and 3D objects. what directions 2D and 3D objects move in a 3D world. what the seven mouse mode buttons are (and which one does not appear in quad view). how an object’s center point affects rotation. what the three axes are that appear when an object is selected and what role they play in movement. what the view of quad view are and how they work. what the coordinates (0,0,0) mean in a 3D system. 1-2

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Today’s Agenda 1.What is a Computer Program? 2.Algorithms and Programming Languages 3.Learning to Program with Alice 4.Objects 5.Classes and the Alice Galleries 6.3D Objects and the Camera 1-3

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What is a Computer Program? Computer is a device that follows instructions for manipulating and storing information. 1-4 How does the computer get those instructions? A computer program is a set of instructions that the computer follows to perform a task. 1.1

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What is a Computer Program? Program Set of instructions; carefully written so that they follow a logical sequence When the computer performs those instructions, the computer is running or executing a program. 1-5 Steps are called an ALGORITHM 1.1

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Algorithms and Programming Languages Algorithm Set of well-defined logical steps Must be performed in order to perform a task 1-6 Example…making a cup of instant coffee: –Remove lid from coffee jar –Put lid down on counter –Remove 1 tsp of coffee from jar –Place that coffee in a cup –Add 8 oz of boiling water to cup –Use teaspoon to stir water and coffee mixture –Stir 10 revolutions –Remove teaspoon from cup and place on counter 1.2 Is this adequate? Is it detailed enough? Is there anything ambiguous in what is written?

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Algorithms and Programming Languages Algorithms as written are understandable by humans (natural language) 1-7 Blah Natural language is NOT understood by computers (machine language) 1.2

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Algorithms and Programming Languages Programming language converted to machine language by compiler or interpreter 1-8 Starting … out … With … Alice …

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Algorithms and Programming Languages Operators + - * / Perform arithmetic and other functions on data. Syntax Set of rules that must be followed. Similar to the set of rules that are followed when people speak a natural language. Writing the Program…writing the code Program consists of keywords, operators, punctuation and more arranged in proper sequence Save, compile, and voila! An executable program!

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning to Program with Alice Alice uses objects Tent Soldier Princess Objects perform actions 1-10 –Turn –Move –Fly –W–Wave 1.3

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Alice System

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-12 PLAY 1.3

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Alice Environment 1-13 Toolbar World View Events Editor Object Tree Details Panel Method Editor 1.3

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Object Properties 1-14 Object Selected Change Properties 1.4

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Methods Set of programming statements executed by object. Methods commonly result in object performing action My first method 1.4

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Methods Objects made of other objects Snowman made of: –head topHat leftEye rightEye carrotNose mouth –leftArm –rightArm –bottom 1-16 NOTE: how objects are named! This is called “camel case” 1.4

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Methods Each object can also be manipulated with methods. Objects and “sub” objects can –Move –Turn –Roll –Say…

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The World is My…object? Contains all other objects Also has its own properties –Atmosphere color –Lighting –Fog

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Alice has Class(es)! Objects are created from classes. Class set of specifications that describe a particular “type” of object Each item found in the Gallery is a class. Each time the class is used, it is an instance of that class. Gallery is a collection of different object types (animals, beach, people, etc.). Two galleries are used: Local gallery (stored on computer) Web gallery (maintained by creators of Alice)

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Blueprint that Describes a House 1-20 Three instances of the house created from the blueprint (class). 1.5

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Class Instance in Alice Class: Chicken Instance: –Chicken1 –Chicken2 Each instance has its own properties, methods, functions

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3D Objects and the Camera Alice world and objects are three- dimensional –Height –Width –Depth } These dimensions are part of 2D objects

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3D Movement Motion is based on OBJECT’s perspective…our left is the Coach’s right Forward is perceived as the object getting larger as it gets closer to us. Backward is perceived as the object getting smaller as it gets farther away from us.