Alice Ch. 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

Another example would be to add a sound to the method, so when the method is called, a specific sound would play

----

To actually complete the animation, the method must be added to your desired animation part by dragging the method into it (by default, we have my first method play our animation). You can add the method multiple times and call different objects to complete the task. This is useful if you want multiple objects performing the same task.

----

Other types of parameters may be used as well, such as a height (number) or lyrics (string)

-----

Methods may be nested. For example, you can implement a slideleft method inside of the skate method when creating the iceskater simulation.

------

Be consistent whether you use isShowing vs opacity at ____

0%

Once a method is written it allows us to think about an overall task instead of all the small actions that were needed to complete the task. This is called _________.

Abstraction

___________ is an object-oriented concept where a new class is defined based on an existing class.

Inheritance

_____-______ ______ can be written that accepts object parameters. This allows you to write a ____-____ _____ and pass in another object. Then, the object performing the _____-_____ ______ can interact with the parameterized object.

Object-level methods, object-level method, object-level method

Methods that specifically reference more than one object are ______-_______ methods. Methods that define behaviors for a single object may be considered _____-_____ methods. ______ a method causes Alice to animate the instructions in the method.

World-level, object-level, calling

abstraction

a programmer thinks of instructions as just one instruction

primitive method

a repertoire of instructions Alice knows how to do

instance

a single occurrence of something

instantiate

an object is created and displayed

We say that the values are sent in as ______ to the _______.

arguments, parameters

Each class is a _______ that tells Alice exactly how to ______ and ______ an object from that class. When an object is ______ and _____, we call this ________ the class because an object is an _______ of that class.

blueprint, create, display, created, displayed, instantiating, instance

stepwise refinement

breaking the overall task down into abstract tasks and then break each task down into smaller pieces and then define the steps in each piece

Make sure you test your method to see there are no ______

bugs

calling a method

causes Alice to animate the instructions in the method

object

character in Alice

Objects can also be rotated around an invisible object. This may be useful for showing objects that you desire to hover around in a _______

circle

A ______ defines a particular kind of object. In Alice, _______ are predefined as 3D models provided in the gallery, categorized into groups such as Animals, People, Buildings, Sets and Scenes, Space, and so on.

class, classes

An advantage of ______-______ methods is that once new methods are defined, we can create a new class with all the new methods (and also old methods) as available actions. This is a form of ________- the new class inherits methods from the old class.

class-level, inheritance

method

coordinated sequence of something

To create a new parameter, simply click the ____ _____ _____ button in the top _____ corner of the ______ window for the desired method

create new parameter, right, editor

class

defines a particular kind of object

Remember that in the _____ window, you can specify what method you want to run when the world starts. By default, this is ____ ____ ____.

events, my first method

To run (or ________) a method, the method must be _______.

execute, called

opacity

how opaque something is

An ______ ______ ______ is not a flowchart. It is an organizational chart that visually illustrates how methods will be used for creating a program.

implementation strategy diagram

To utilize your new class, you must first ______ it from the _____ menu. This class may be imported into any new world

import, file

Later instances of the new class still know how to perform all the actions defined in the original class but will also be able to perform all the actions in the newly defined methods. We say the new class ________ all properties and methods of the original class.

inherits

Another phrase for "calling a method" is "_____ ___ _____"

invoking a method

Another way to change opacity is to alter the property known as ____________

isShowing

The methods will always appear on the _____ in the _____ window

left, details

A _______ is a coordinated sequence of instructions that will be carried out when requested.

method

A _______ allows the programmer to think about a collection of instructions as if it was just one instruction- this is called _______

method, abstraction

object-level method

methods that define behavior for a single object

world-level method

methods that specifically refer to more than one object

Inheritance- benefits: Inheritance in most object-oriented programming languages is more complicated than in Alice. The basic idea is the same- adding functionality by defining new _________ for a new kind of inherited class. Inheritance is considered one of the strengths of object-oriented programming because it allows you to write code ________ and _______ it in other programs.

methods, once, reuse

Every object in Alice has a repertoire of instructions it knows how to do- ____, ____, ____ ___ ____, etc.

move, turn, turn to face

You may call methods inside of ___ ____ ____ or in methods that you create

my first method

To call a method, simply drag the method- either created by the programmer or built into the object desired- into the ___ ____ ____ tab in the ____ window. You can also drag methods into _____ _____.

my first world, editor, other methods

For example, if I created a method called slither that takes an object parameter, I can specify which _______ I want to call the method for by adding the proper object as an argument.

object

Multiple methods may be created for each _____

object

To create a new method: Click on an object in the ____ ___ and then use the ______ tab in the Details panel. The _____ ____ ___ button allows you to create a new method, and a popup box allows you to enter the _____ of the method.

object tree, details, create new method, name

A parameter must be declared to represent a value of a particular type. Types of values for parameters include _______, _______, _______, _______, _______, ______, and others.

object, Boolean, number, string, sound, color

Writing new methods that define new actions to be carried out by an object acting alone (rather than several objects acting together) are called ______-_____ _______

object-level methods

_____-_____ ______ refer only to individual object

object-level methods

A new class can be created by defining _________-_______ _______ and then saving out the class with a _________ _______.

object-level methods, new name

inheritance

object-oriented concept where a class is defined based on an existing class

All _____ of the same class share some commonality. For example, All Person objects have properties such as two legs, two arms, height and eye color.

objects

To change the visibility of objects we have to change the object's ________

opacity

_______ is how opaque something is: how hard it is to see through

opacity

A ______ allows you to send information when the method is called.

parameter

A ________ may be used throughout the entire method if desired

parameter

To add a sound, name the _________, and click on the box for other and specify the type (in this case, choose sound)

parameter

When adding a new _________, you must specify which type of parameter it is (number, boolean, object, etc.) and what it must be called

parameter

Object-level methods may or may not contain a __________. You may also create a new ______

parameter, class

A ____________ acts like a basket to receive information that we send to a method. In a way, you can think of a method as somewhat like a _______- a set of instructions that describe how to perform some action. _______ hold onto the specific items of information.

parameter, recipe, parameters

It is possible to add multiple ___________ to a method

parameters

______________ are used for communication with a method

parameters

These instructions are actually ________ methods, built into Alice software. The _______ methods can be organized into a method of your own- to carry out a small piece of the overall _________. Each method performs its own job, but all the methods in a program work together to create the overall ________.

primitive, primitive, program, animation

If you would like to save the class that you are currently using (and possibly use it later in another project), _______ click on the object inside the _______ ______ that contains the object-level methods and Save object. This saves an actual copy of the classes as a .a2c file. The new class may be imported into a new class. It is recommended that you save the class as a different name than what is there originally to distinguish the difference between the two classes.

right, object tree

isShowing

selecting this property to true and false will alter the visibility of the desired object

We revise our storyboard design to use a technique of breaking the overall task down into abstract tasks and then break each task down into smaller pieces and then define the steps into each piece. This design technique is known as _________ ________.

stepwise refinement

Guidelines for writing object-level methods: 1.) Do create many different object-level _______ 2.) Play a sound in an object-level method only if the sound has been imported for the ______ (instead of the world) 3.) Do not call world-level methods from within a _____-_____ ________ 4.) Do not use instructions for other objects from within a _______-______ ________

styles, objet, object-level method, object-level method

argument

the arguments that are sent to the parameters

To delete a method, simply drag the method you created to the ____ ____ at the ____

trash can, top

Each object has this property and is located in the properties tab in the details window on the left. Selecting this property to _____ or ______ will alter the visibility of the desired object.

true, false Property is "isShowing"

by defalt

unless you tell Alice otherwise

parameter

used for communication with a method


Conjuntos de estudio relacionados

PICU Prep Board Review Questions 2010

View Set

SMSH-PROJECTS-HALF LIFE CALCULATIONS-10/12/23

View Set

NUR 236 PrepU Chapter 36: Pain Management in Children

View Set

MicroEcon TESTS (1,2,3) - Final 22

View Set