Programming Logic and Design, Chapters 11-13 & 15

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Properties

By specifying characteristics such as color, size, and location, __________ determine how a GUI element appears on the screen.

Overhead

Actions taken by the computer when a module is called, such as allocating memory for parameters and local variables, are referred to as __________.

Component

An item that appears in a program's graphical user interface is known as a(n) __________.

Command line interface

Before GUIs became popular, the __________ was the most commonly used.

End the program

If a menu-driven program uses a loop to redisplay the menu after a selected operation has been performed, the menu should probably have an item that the user can select to __________.

delete(str, 3, 6)

If the str variable contains the string "Redmond", which pseudocode statement changes its contents to "Red"?

insert(str, 0, "black")

If the str variable contains the string "berry", which pseudocode statement changes its contents to "blackberry"?

Depth of recursion

The number of times that a module calls itself is known as the __________.

Base case

The part of a problem that can be solved without recursion is the __________.

Recursive case

The part of a problem that is solved with recursion is the __________.

True

True/False. A recursive algorithm must reduce the problem to a smaller version of the original problem in the recursive case.

False

True/False. A recursive algorithm must solve the problem with recursion in the base case.

True

True/False. Any algorithm that can be coded with recursion can also be coded with a loop.

True

True/False. If a menu-driven program does not use a loop to redisplay the menu after each operation, the user will have to rerun the program to select another operation from the menu.

True

True/False. In most cases, a menu-driven program should be modularized.

True

True/False. In most programming languages, when you use a subscript or other mechanism to access an individual character position within a string, that character position must already exist or an error will occur.

False

True/False. It is not usually necessary to validate the user's menu selection.

False

True/False. You can access an uninitialized variable.

False

True/False. You cannot use nested If-Then-Else statements to perform the action selected by the user from a menu.

An error will occur.

What will the following pseudocode result in? Declare String name = "Sall" Set name[4] = "y"

Direct recursion

When a module explicitly calls itself it is called __________.

Indirect recursion

When module A calls module B, which calls module A, it is called __________.

Decision

When the user selects an item from a menu, the program must use a(n) __________ structure to perform an action based on that selection.

Submenu

When the user selects an item from a multiple-level menu, a(n) __________ might be displayed next.

Single-level menu

When the user selects an operation from a(n) __________, the program immediately performs that operation and then the program redisplays the menu (or the program ends if it does not use a loop to redisplay the menu).

Multiple-level menu

When the user selects an operation from a(n) __________, the program might display another menu.

Display str[0]

Which pseudocode statement displays the first character in the String variable str?

Display str[length(str) - 1]

Which pseudocode statement displays the last character in the String variable str?

The Towers of Hanoi

__________ is a mathematical game that is often used in computer science textbooks to illustrate the power of recursion.

4

A module is called once from a program's main module, and then it calls itself four times. The depth of recursion is __________.

Recursive module

A module that calls itself is known as a(n) __________.

Main menu

A program that uses a multiple-level menu displays the __________ when it starts.

GUI

A type of program that is typically event-driven is the __________ program.

Menu

A(n) __________ is a list of operations displayed on the screen that the user may choose from.

Event handler

A(n) __________ is a module that automatically executes when a specific event occurs.

Dialog box

A(n) __________ is a small window that displays information and allows the user to perform actions.

Event

A(n) __________ is an action that takes place within a program, such as the clicking of a button.

Case

A(n) __________ structure is often the easiest and most straightforward decision structure to use in a menu-driven program. Note: Other approaches can be taken as an alternative.

GUI

The __________ allows the user to interact with the operating system through graphical elements on the screen.

User interface

The __________ is the part of a computer with which the user interacts.


Kaugnay na mga set ng pag-aaral

WSET Level 1 - Module 1. What is wine and how is it made?

View Set

Chapter 15 [15.2c Cerebrospinal Fluid]

View Set

VOC SCIENCE POLITIQUE avec Baudouï

View Set

McTighe ch. 51 Reproductive System

View Set

chap 10 stream erosion and river systems

View Set

Health Assessment Chapter 14 Hair Skin and Nails LabManual

View Set

Weight Training Biomechanics and Kinesiology Terms

View Set