study guide for test chapter 5, 6,& 7 test is friday, may 15th
TRANSCRIPT
Study Guide For Test
Chapter 5, 6,& 7Test is Friday, May 15th
Today’s Agenda: Review Vocabulary Words Review main points from
Chapter 5 Chapter 6 Chapter 7
Questions & Answers about the test. To Do List:
Finish working on projects! Homework:
Study for Test! It’s Monday.
Vocabulary Words – Chapter 5
Event An event is something that happens. In response to an event:
an action or a sequence of many actions is carried out.
What is an Event?
Every time the user clicks the mouse or presses a key on the keyboard to send a signal to Alice about what to do next. The mouse click or key press is an event!
In this chapter we learn the mechanics of how the user create an event and how the program responds to the event.
Example: think of a video game – A Car Race. The scene is determined on how skillful the driver is steering the car.
Vocabulary Words – Chapter 5
Event handling method As a programmer you
respone to an events. The event must be linked to the responding method. The method is now said to be an event handling method.
Events – How many are there?
Vocabulary Words – Chapter 5
Incremental development Use when testing a program! How?
Write a method and test it, write a method and test it, until the program is completed.
This is incremental devleopment!
Testing! How to test? Just save the world and press
the PLAY button. Tip: It is important to test event handling
methods as they are developed. Write a method and test it, write a method and test it, until the program is completed.
Why? Incremental development! The advantage is in making it easier to debug your program. When something isn’t working, it can easily be fix before it causes bigger problems elsewhere in your program.
Vocabulary Words – Chapter 5
Interactive (of a computer program or system)
interacting with a human user, often in a conversational way, to obtain data or commands and to give immediate results or updated information: For many years airline reservations have been handled by interactive computer systems.
Interactive Program –vs-
Non-Interactive ProgramWhat is the main difference?
Interactive The sequence of actions is
determined at runtime! Occurs when:
The user clicks the mouse
Presses a key on the keyboard
Objects in the scene move (randomly or guided by the user)
User can create some conditions like a collision.
Non-Interactive The sequence of actions is
pre-determined by programmer
Programmer designs a complete storyboard
Programmer writes the program code for the animated actions.
Every time the program runs the same sequence will occur.
Vocabulary Words – Chapter 6 Function
Allows you to check certain conditions within a world while the animation is running.
Use a function to ask a questions. Purpose of a function is to return a value. A Value returned by a funciton can be a number,
an object, a Boolean (true or false) or some other type.
Can be a built-in function! Provided by Alice. Used to provide information for instructions in a
method. Can be your own function! You write the coding.
Vocabulary Words – Chapter 6
If/Else statement Is a statement that makes a decision
based on the value of a condition as a program is running.
Do this Action!
Do something else
If True?
T F
Vocabulary Words – Chapter 6
Integer Are whole numbers! Have no digits to the right of the decimal
point.
Vocabulary Words – Chapter 6
Logical operator There are three of them!
Vocabulary Words – Chapter 6 Random number
Play a big role in certain kinds of computing applications.
Are used In creating secure encryptions for transmission
of information on the Internet. In various kinds of scientific simulations To create ‘what-if’ situations in weather
simulation programs. Take a look at the Pet penguin sliding on the ice
example on page 192 (new book).
Vocabulary Words – Chapter 6 Relational operator
There are six of them!
Computes a true or false value based on the relationship between two values.
Vocabulary Words – Chapter 6 Return statement
Every function must have a Return statment because all functions return a value.
Alice automatically adds a Return statement at the end, reminding you that your function must return some information.
You cannot remove the Return statement.
Vocabulary Words – Chapter 7
Count Is used to describe the number of times
a loop repeats.
Vocabulary Words – Chapter 7
Definite loop Is loop where you as the programmer
know exactly how many times a block of instructions should be repeated.
Vocabulary Words – Chapter 7
Indefinite loop Is loop where you as the programmer do
not know how many times a block of instructions should be repeated.
It’s a While loop!
Vocabulary Words – Chapter 7 While
Is also know as a conditional loop. Will repeat a block of instructions where
we do not know exactly how many times a loop should be repeated.
All you need to know is the condition that determines whether the loop will be repeated.
Example: While some condition is true perform
instruction(s)
Vocabulary Words – Chapter 7
Infinite Loop Is a loop that will continue to execute in
a never-ending cycle. It is often an program error!
What will be on the test?
Chapter 5 – Interaction! Chapter 6 –Functions and If/Else Chapter 7 – Repetition! Loops/While
Loops You can use your notes – but not this
powerpoint!