Learning to Program with Alice – Chapter 1 September 16, 2009.

18
Learning to Program with Alice – Chapter 1 September 16, 2009

Transcript of Learning to Program with Alice – Chapter 1 September 16, 2009.

Learning to Program with Alice – Chapter 1

September 16, 2009

What are you going to do?

You will be creating programs by dragging and dropping program elements (if/then statements, loops, variables, etc.) in a mouse-based editor that prohibits syntax error.You don’t need to write code! The software will do that for you. So, you should not have any syntax errors.Good thing about your programs is that you run Alice programs in a World Wide Web browser. So you can post your work to a Web page!You will be able to create complex programs (say, 300 – 3,000 lines) by the end of the quarter/semester. Capstone Project Idea for next year!

Chapter 1 – Getting Started with Alice

Vocabulary Words:

Computer ProgrammerAliceObject(s)ProgramDocumentationSequential processingConditional processingLoopingFunctionObject-oriented programmingVirtual World3D (three dimensional) modelsSix Degrees of freedomCenter

Computer Programmer

A programmer or software developer is someone who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software. A programmer's primary computer language (C, Java, C++, etc.).

AliceIt is software that will teach you to program a computer.It allows you become a director of a movie, or the creator of a video game, where 3D objects in an on-screen virtual world move around according to the directions you give them. It was named in honor of Charles Lutwidge Dodson. (Pen name was Lewis Carroll)

He wrote ‘Alice in Wonderland and Through the Looking Glass’.

Object(s)

Are things that you can actually see.

Some examples:Person

Animal

Table

Chair

Program

A SET OF INSTRUCTIONS THAT TELL THE COMPUTER WHAT TO DO!

Documentation

Comments in the program, a web page for reference, or an accompanying written document that help another human being understand what you were trying to do.

Sequential processing

Running a single task to completion.They are statements in a program that are executed one after the other in the order in which they are written.Example: “Beat the eggs, mix in flour, sugar, and shortening, pour into baking pan, then bake at 375 degrees for 45 minutes” .

Conditional processing

Remember VB?

These are your if statements!

Example: ‘If it is raining, than take an umbrella’

Looping

This is a repeating behavior.

An action that is repeat over and over again until a condition turn false.

Example: ‘As long as there are cookies on your plate, keep eating the cookies’

Function

Compute a result.

It is a question!

Example: ‘How much does the baby weigh? Or What is Rebecca’s phone number?’

Object-oriented programming

Is programming that uses "objects" and their interactions to design applications and computer programs.

Virtual World

A virtual world is a computer-based simulated environment intended for its users to inhabit and interact via avatars (is computer user's representation of himself or herself, whether in the form of a three-dimensional model used in computer games) the form of two or three-dimensional graphical representations of humanoids (or other graphical or text-based avatars). Most, but not all, virtual worlds allow for multiple users.Is a video game or simulation implemented in 3D.Using a virtual world lends a sense of reality to the simulator and increases its effectiveness.

3D modelsIs like a blue print used to design a house.The blue print provides a model of what the house will look like.In Alice, 3D models tells Alice how to create a new object in the scene.They provide instructions on how

to draw the object, what color it should be,

what parts it should have, its size (height, width, and depth).

They are located in Local Gallery and additional models can be found on www.alice.org

Six Degrees of freedomThe amounts to six possible directions in which an object may move.An object has six degrees of freedom to move around in a world.It’s the object possible direction of motion.

UpBackRightLeftForwardDown

Center

Each object in Alice has a unique “center”.The center point of an object is at the center of its bounding box or as near to the center of mass as the graphic artist could determine.The center point provides a reference for a pivot or spin type of movement.

Center located between their feet

Your Assignment!

Chapter 1 – Exercise 4 –Tea Party

Chapter 1 – Exercise 5 – Soldiers on Deck

Finish any old exercises

Call me when finished and I will check your work.

Test on Friday – Chapter 1 (You can use your notes!)

Any questions?