Object-Oriented Software Design Chapter 6 Questions For What The Purpose Conditional Expression Ifelse Statement Allows For

subject Type Homework Help
subject Pages 1
subject Words 345
subject Authors Randy Pausch, Wanda P. Dann

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Questions for Chapter 6
1) What is the purpose of a conditional expression in an If/Else statement?
2) A conditional expression in an If/Else statement must evaluate to what type of value?
3) What type of value is obtained by evaluating each of the following expressions: a) height
< 3, b) (5 + 1) * 10, c) who == plato?
a) Boolean
4) In Alice, where can you find the built-in random number functions?
5) Alice provides many built-in functions. Why would a programmer want to write hir/her
own function?
6) Why must a function have a Return statement?
A function must return the specified type of information. If it did not, the caller of the
7) Is it possible to have more than one Return statement in a function? Explain your answer.
8) What is the difference between the types of parameters (explained in Chapter 4) used in
methods and the types of values that can be returned from a function?
They behave quite analogously. The difference is that the parameters behave as input to
9) In Alices drag and drop interface, nested tiles and parentheses are automatically inserted
in the expression. What is the purpose of nested tiles and parentheses in an expression?
10) In a Boolean expression containing multiple conditions, what operators may be used to
connect the conditions?
11) A Boolean expression containing multiple conditions is often difficult to understand.
What alternate structure can be used to obtain the same result?

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.