Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/195

Click to flip

195 Cards in this Set

  • Front
  • Back

What allows you to create methods with the same name in different classes and gives you the ability to call the correct method depending on the type of object that is used to call it?


Constructor


Inheritance


Accessor


Polymorphism


None of these

Polymorphism

When the program is running, it can use the class to create, in memory, one object of a specific type as needed. T/F

False

Which of the following tasks are performed by a procedure?


Reading a file


Gathering input


Displaying output


All of these


None of these

All of these

________ is another name for accessor methods.


Getters


Accessors


Setters


Private


None of these

Getters

The act of declaring a class variable does not actually create an object in memory.


T/F

True

What software entity contains both data and procedures?


Objects


Instances


Events


Memory location(s)


None of these

Objects





What type of programming encapsulates data and functions together in an object?


Object-oriented


Interactive


Procedural


Menu-driven


None of these

Object-oriented



The private object fields can be directly manipulated by outside entities. T/F

False

The class ________ starts with the word Class followed by the name of the class.


body


definition


return


members


None of these

definition

Which of the following are contained in a UML diagram for a class?


Class name


Class fields


Class methods


All of these


None of these

All of these



When a superclass method has the same name as a subclass method, it is often said that the superclass method overrides the subclass method.T/F

False

External entities do not have direct access to the object's private methods. T/F

True

When a class variable is assigned the address of an object, it is said that the variable references the object. T/F

True

If a constructor is not written when the class is compiled, then a constructor is automatically provided and it is known as the default constructor. T/F

True

The variables, arrays, or other data structures that are stored in the object are known as the object's


Records


Methods


Addresses


Fields


None of these

Fields

In a UML diagram, what character do you place in front of a field of method name to indicate it is public?


+


=


P


-


None of these

+

What is the term used for the fields and methods that belong to a class?


body


definition


return


members


None of these

members



Procedures typically operate on data items that are within the procedure. T/F

False

The programmer determines the fields and methods of an object and creates the ________ code.


Print


Class


Module


Procedure


None of these

Class

The procedures that the object performs are known as ________.


Records


Methods


Addresses


Fields


None of these

Methods

When an object's internal data is hidden from outside code and access to the data is restricted to the object's methods, the data is protected from accidental corruption. T/F

True

The mutator methods are sometimes called ________.


getters


accessors


setters


private


None of these

setters

________ is a standard way of drawing diagrams that describe object-oriented systems.


Data flow diagram


UML


Flowchart


Hierarchy chart


None of these

UML

In an inheritance relationship, the superclass inherits members from the subclass, not the other way around. T/F

False

The separation of data and the code that operates on the data can lead to problems as a program becomes larger and more complex.T/F

True

The word Private that appears before a field declaration, in a class definition, is known as a(n) ________.


access specifier


specifier


Class


specifier


Inside


specifier


None of these

access specifier

What type of programming is centered on the procedures or actions that take place in a program?


Object-oriented


Interactive


Procedural


Menu-driven


None of these

Procedural

When a piece of data is written to a file, it is copied from a variable in ________ to the file.


cyberspace


RAM


flash memory


All of these


None of these

RAM

How many steps must be taken when a file is used by a program?


One


Two


Three


Four


None of these

Three

What is the terminology used when a task is temporarily interrupted as a control variable reaches a specific value?


Control break


End of page


Break


Control break logic


None of these

Control break logic

When a web page is visited, the browser stores a small file on the user's computer, known as a ________.


cookie


biscuit


web file


temp file


None of these

cookie

What type of data file cannot be opened and viewed in an editor such as Notepad?


Text file


Output file


Input file


Binary file


None of these

Binary file

In an input file, what maintains the location of the next item that will be read from the file?


Read locator


Read position


Marker


Read marker


Locator

Read position

The programmer has the option to append data anywhere in an output file.T/F

False

In the ________ step the data is either written to the file or read from the file.


opening


processing


closing


I/O


None of these

processing

The data saved in a file will remain there even after the program stops running but will be wiped out when the computer is turned off.T/F

False

A file with the extension .doc usually indicates that the file contains a note written by a doctor.


T/F

False

In general, how many types of files are there?


one


two


three


five


None of these

two

What is a short sequence of characters that appears at the end of a filename and is preceded by a period called?


File extension


Filetype extension


Filename extension


Fileaccess extension


None of these

Filename extension

What is the term used to describe a file that data is read from?


In file


Out file


Output file


Input file


None of these

Input file

Programmers usually refer to the process of saving data to a file as ________ a file.


saving data to


copying data to


writing data to


put data to


None of these

writing data to

Which flowcharting symbol is used for opening and closing files?


Rectangle


Parallelogram


Diamond


Oval


None of these

Rectangle

The use of a buffer increases the system's performance because writing data to memory is faster than writing to a disk. T/F

True

The sequential access file is similar to the way a cassette player works. T/F

True

Data files are less and less needed in current gaming software. T/F

False

When an input file is opened, the read position is initially set to the first item in the file.


T/F

True


Which type of data file access allows access to any piece of data in the file without reading the data that comes before it?


Direct access


Sequential access


Input access


Output access


None of these

Direct access

The term "output file" is used to describe a file that data is read from. T/F

False

All types of data files are viewable in a text editor. T/F

False

The direct access file is similar to the way an MP3 player works: the player starts from the beginning.T/F

False

In a text file, all data is stored as a series of characters. T/F

True

Programmers use pseudocode to create "mock-ups" of programs because they do not have to worry about syntax rules. T/F

True

A(n) ________ is a name that represents a value that cannot be changed during the program's execution.




Uninitialized variable


Named variable


Named constant


Input variable


None of these

Uninitialized variable

An uninitialized variable is a variable that has been declared and automatically initialized to zero. T/F

False

Which of the following is not a variable data type?


Number


Integer


Real


String


None of these

Number

________ documentation is a reference guide that describes the features of the program, designed for the user.


Line


External


Internal


Block


Program

External

What term is used for a string that appears in the actual code of a program?


String literal


Virtual string


Hard copy


Strongly typed


None of these



String Literal

The expressions (a + b) / c and a + b / c will always yield identical results. T/F

False

The program development cycle is made up of ________ steps that are repeated until no errors can be found in the program.


Five


Four


Three


Six


None of these

Five

What symbol is used to mark the beginning and end of a string?


Slash


Comma


Question


Asterisk


Quotation

Quotation

What is the first step of the program development cycle?


Correct syntax errors


Design the program


Test the executable code


Debug the code


Write the code

Design the program

What is another term used for "desk checking"?


Checking


Debug


Hand tracing


Execute


Run

Hand Tracing

A variable is a storage location in memory that is represented by a name and can hold different values during the execution of the program. T/F

True

What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to be compiled or executed?


Program


Algorithm


Flowchart


Pseudocode


Code

Pseudocode

Ovals are used as terminal symbols marking the starting and end of the pseudocode.


T/F

True

The value of the expression 12 - 4 * 3 / 2 + 9 is ________.


21


15


-6


2.18

21

Programmers start writing code as the first step when they begin a new project.


T/F

False

A sequence of characters that is used as data is called a string in programming. T/F

True


Which symbol is used for an assignment statement in a flowchart?


Processing


I/O


Terminal


Parallelogram


None of these

None of these

The following is an example of what type of statement: Set rate = 5.75


Declaration


Assignment


Input


Output


None of these

Input

It has been proven by a group of mathematicians that all programs can be written using only three structures.T/F

True

Most programming languages do not automatically print spaces between multiple items that are displayed on the screen.


T/F

True


Which of the following is not an actual programming language?


C++


Pseudocode


Visual Basic


Python


Java

Pseudocode

A named constant can be assigned a value using a Set statement.T/F

False


The process where the programmer steps through each of the program's statements one by one is called ________.


Hand tracing


Execute


Debug


Run


Checking

Hand Tracing

If you mistakenly write pseudocode into an editor for an actual programming language, such as Python or Visual Basic, errors will result. T/F

True

The hierarchy chart does not reveal any details of the steps taken inside the module.T/F

True


What tool would a programmer use to visualize the relationship between modules?


Flowchart


Hierarchy charts


Pseudo charts


Modular charts


None of these

Hierarchy charts

Function is another name for ________.


Module


Variable


Reference


Sub class


None of these

Module

Modules can be written for commonly needed tasks, and those modules can be incorporated into each program that needs them.T/F

True

The following is an example of a module ________. Call ShowNetPay()


Display


Execution


Body


Header


Definition

Execution



Which type of variable is visible to every module and the entire program?


Pass by value


Pass by reference


Global


Reference


Local

Global

The module definition comprises the module header and the module ________.


Call


Body


Arguments


Parameters


Statements

Body

What is the term used for the memory address of the location of the statement immediately after the module call?


Resume point


Return address


Continue point


Resume address


Return point

Return point

The scope of a variable is the segment of the program in which the variable can be accessed.


T/F

True



In most languages a module definition has three parts: a header, body, and footer.T/F

False

When an argument is passed by value, the communication channel works only in one direction.T/F

True

The arguments in a module call and the parameters listed in the module header must be of compatible data types. T/F

True

An attempt to pass a non-variable argument into a reference variable parameter will cause an error. T/F

True

When an argument is passed by ________, it is not affected by a change of the content of the parameter variable.


Value


Constant


Reference


Variable


None of these

Value

In a flowchart, the module call is represented by a ________ symbol with vertical bars at each side.


Parallelogram


Square


Rhombus


Rectangle


None of these

Rectangle

What is the term used for the variable that receives an argument that passed into a module?


Global


Local


Parameter


Constant


None of these

Parameter

Passing an argument by ________ means that only a copy of the argument's value is passed into the parameter variable.


Value


Constant


Reference


Variable


None of these

Value

What phrase is placed in the starting terminal symbol of a module in a flowchart?


Resume


Continue


Start


Name of the module


Begin

Name of the module



The top-down design process is sometimes called stepwise refinement. T/F

True

A pass by reference argument establishes a two-way communication with the module, but the value of the argument cannot be modified via the reference variable. T/F

False

Which of the following is not a benefit of using modules?


Simpler Code


Faster Development


Code Reuse


Better Testing


None of these

None of these

________ variables are useful for establishing two-way communication between modules.


Value


Constant


Reference


I/O


None of these

Reference

Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug?


Pass by reference


Pass by value


Local


Reference


Global

Global

Modules are commonly called what?


Procedures


Subroutines


Subprograms


Methods


All of these

All of these

A module can have two variables of the same name because they are within the same scope.


T/F

False

The If-Then-Else statement should be used to write a single alternative decision structure. T/F

False

Which operator would make the following expression false?


True_______False


AND


NOT


OR


All of these


None of these

AND



The ________ symbol indicates that some condition must be tested in a flowchart.


Square


Diamond


Parallelogram


Oval


Rectangle

Diamond

Which structure is a logical design that controls the order in which a set of statements executes?


Control


Sequence


Module


Terminal


None of these

Sequence

A nested decision structure can achieve the same logic as a case structure.T/F

True



A case structure is a ________ alternative decision structure.


Single


Dual


Multiple


Single or dual


All of these

Multiple

A nested decision structure can be used to test more than one condition.T/F

True

Which operator is used to determine that the operands are not exactly of the same value?


=


!


=!


==


None of these

None of these

The first line of the case structure starts with the word CASE followed by the test expression.T/F

False

In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true.T/F

True



The ________ operator is a unary operator, as it works with only one operand.


AND


NPR
OR
All of These
None of these

NOT



Which of the following operators reverses the logic of its operand?


NOT
AND
OR
ALL of these


None of these

NOT



What two logical operators perform short-circuit evaluation?


NOT and OR


AND and OR


AND and NOT


All of these


None of these

AND and OR



Although the sequence structure is heavily used in programming, it cannot handle every type of task.T/F

True



A condition is a ________ expression.


Boolean


Relational


Logical


Mathematical


None of These

None of these

The ________ operator could be used, in some situations, to simplify nested selection structures.


AND


NOT
OR
All of these


None of these

AND

Pseudocode could be logically incorrect if not properly indented.T/F

False

If the expression is false, the ________ operator will return true.


AND
NOT
OR
All of these


None of these

NOT

What type of operators are the following?


< > >= <- == !=


Boolean


Relational


Logical


Mathematical


None of these

Relational

What type of operator can be used to determine whether a specific relationship exists between two values?


Boolean


Relational


Logical


Mathematical


None of these

Relational



An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode.T/F

False



Which of the following is a logical operator?


AND


NOT
OR
All of these


None of these

All of these

It is possible to write a complete program using only a decision structure.


T/F

False



In many languages the case structure is called a ________ statement.


Branch


Jump


Selective


Switch


All of these

Switch

The If-Then-Else statement can be used to simplify a complex nested decision structure.


T/F

True

Which loop repeats a statement or set of statements as long as the Boolean expression is false?


Do-While


Do-Until


For


While


None of these

Do-Until

Modules can be called from statements in the body of any loop.T/F

True

The While loop gets its name from the way it works: While a condition is false, do some task.


T/F

False

The ________ represents a special value that marks the end of a list of values.


Sentinel


Stop


End


Any of these


None of these

Sentinel

The conditions that control a loop repetition are Boolean expressions.


T/F

True

A posttest loop does not perform any iteration if the Boolean expression is false to begin with.T/F

False



How many times will the following loop iterate?


Set k = 1


Do


Display k


Set k + k + 1


Until k>1


Three


Infinite


No iterations


Two


One



One

The While and For loops are considered pretest loops because they test the condition before processing the statement(s) in the loop body.


T/F

True



A While loop repeats infinitely when there is no statement inside the loop body that makes the test condition false.T/F

True



Which loop statement does not contain an increment statement but automatically increments the counter at the end of each iteration?


Do-While


Do-Until


For


While


None of these

For

The following is an example of what type of loop? For k + 7 To maxValue


Do-while


Count-controlled


Condition-controlled


While


Do-until

Count Controlled

In the For statement, you can only use positive integers as step values.T/F

False

To ________ a variable means to decrease its value.


Negate


Increment


Initialize


Reference


Decrement

Decrement

How many times will the following loop iterate?


Set k = 1


While k< = 5


Display k


End While


Infinite


No iterations


Two


Five


Three

Infinite

Which of these are posttest loops?


While and Do-Until


Do-Until and For


While and Do-While


Do-While and For


Do-While and Do-Until

Do-Until and For



In a For loop, the programmer should know the exact number of iterations the loop must perform before writing the code.T/F

False

The While loop will never execute if its condition is true to start with.T/F

False

Which pair of loops causes a statement or set of statements to repeat as long as a condition is true?


Do-Until and For


Do-While and For


Do-While and Do-Until


While and Do-While


While and Do-Until

While and Do-While

A condition-controlled loop can be used to iterate the body of the loop a specific number of times.T/F

True

What type of loop uses a Boolean expression to control the number of times that it repeats a statement or set of statements?


Condition-controlled


Do-while


Count-controlled


While


Do-until

Condition-controlled

Any loop that can be written as a Do-While loop can also be written as a While loop.T/F

True

A loop that accumulates a total as it reads each number from a series is often said to keep a what?


Average


Maximum value


Running total


Accumulation


None of these

Running total

In a count-controlled loop, the counter performs ________ action(s).


Five


Two


One


Three


Four

Three

Most programming languages let you assign an integer value to a real variable without causing an error.T/F

True



The value that is returned from a function can be used just like any other value.T/F

True

Which of the following errors occur when a real value is attempted to be assigned to an integer variable?


Integer value


Type mismatch


Conversion


Assignment


None of these

Type mismatch

Which function accepts two strings as arguments, returns "True" if the first string contains the second string, and otherwise returns "False"?


Append


Concatenate


Contains


Substring


None of these

Contains

The number of arguments that can be passed to a function are limited in most programming languages.T/F

False

The parameter list that accepts arguments is optional in a function definition.T/F

True

Which of the following statements is true after the execution of the following statement?


y + abs(x)


y contains the absolute value of x


x contains the absolute value of y


x contains the absolute value of the value in y


y contains the absolute value of the value in


x


None of these

y contains the absolute value of x

The input column in the IPO chart describes the process the function performs on the input data.T/F

False

Which function returns a string within a string?


Append


Concatenate


Contains


Substring


None of these

Substring

What term is used in the ending terminal symbol of a function flowchart?


Return


End


Function


End


Function


Return


None of these

Return

The term ________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen on the input, and produces output.


White box


Black box


White cube


Black cube


None of these

Black Box

Random numbers are commonly used in which type of program?


Games


Simulations


Statistical analysis


Data encryption


All of these

All of these

What is the data type of the value returned by the random library function?


String


Integer


Boolean


Real


None of these

Integer

The function body follows the function header in a function definition.T/F

True

Library functions are built into the programming language, and can be called any time they are needed.T/F

True

The function ________ specifies the return data type, name of the function, and the parameter variable(s).


Definition


Body


Header


Statement


None of these

Definition

Random numbers are useful in simulation programs where the computer must randomly decide how an object will behave.T/F

True

In the IPO chart, the ________ column describes the data that is passed to the function as arguments.


Output


Function


Process


Input


None of these

Input

When a function finishes, it returns a value back to the part of the program that called it.T/F

True

The library functions in every programming language have the same function names and accept the same arguments, but their behaviors might differ slightly.


T/F

False

The toInteger function accepts a real number as its argument and preserves any fractional part in the returned number.T/F

False



Which of the following array declarations would be best suited for storing the retail prices?


Declare String retailPrice[SIZE]


Declare Real retailPrice[SIZE]


Declare Integer retailPrice[SIZE]


All of these


None of these

Declare Real retailPrice[SIZE]

A partially filled array is normally used with ________.


a library function that performs array insertions


an accompanying variable that holds a copy of the last item stored in the array


an accompanying integer variable that holds the number of items that are actually stored in the array


a warning to the user that some of the elements contain invalid values


None of these

an accompanying integer variable that holds the number of items that are actually stored in the array

What is the term used for the number inside the bracket that specifies the number of values that an array can hold?


Size


Size declarator


Number


Number declarator


None of these

Size declarator

One of the advantages of two- or more dimensional arrays is that the data values can be of two or more data types.T/F

False

Unlike variables, arrays need to be initialized separately from the declaration.T/F

False

In a sequential search algorithm, the Boolean variable used as a flag is initialized to TRUE.


T/F

False



Subscripts are used to identify specific elements in an array.T/F

True

Which of the following statement is true about the statement below?


Declare Integer score [5] = 83, 92, 78, 94, 71


This is an array declaration.


This is an array declaration and size establishment.


This is an array size establishment.


This is an array initialization.


This is an array declaration and initialization.

This is an array declaration and initialization.

Which is the simplest search technique to use to find an item in an array?


Sequential


Binary


Bubble


Select


None of these

Sequential

Multiple-dimensional arrays can be used to model data that occurs in multiple sets. T/F

True

Which of the following arguments must be passed when passing an array as an argument?


The array itself


An integer that specifies the number of elements in the array


The data type of the array


The array itself and An integer that specifies the number of elements in the array


The array itself and The data type of the array

The array itself and An integer that specifies the number of elements in the array

A three-dimensional array can be thought of as ________ of two-dimensional arrays.


Score of 5


Score sub 4


Score of 4


Score sub 5


Score 5

Score sub 5

The expression score[5] is pronounced ________.


Score of 5


Score sub 4


Score of 4


Score sub 5


Score 5

Score sub 5

________ arrays are two or more arrays that hold related data, and the elements are accessed using a common subscript.


Sequential


Binary


Parallel


Linear


None of these

Parallel

When processing the data in a two-dimensional array, each element has two subscripts.T/F

True

Variables work well in many situations, but they have limitations.T/F

True

How many subscripts do you need to access one element in a two-dimensional array?


One


Two


Three


Four


None of these

two

The first step in calculating the average of the values in an array is to get the total of the values.T/F

True

To calculate the total of the values in an array, a loop is used with an accumulator variable.T/F

True



Two-dimensional arrays can be thought of as containing ________.


Rows and lines


Rows and columns


Lines and pages


Lines and columns


Rows and pages

Rows and columns

What is the term used for the value that is searched for in a search algorithm?


stringValue


searchValue


matchValue


flag


None of these

searchValue



Access the individual elements in an array by using their ________.


Sizes


Numbers


Integers


Subscripts


None of these

Subscripts

Processing a large number of items in a(n) ________ is usually easier than processing a large number of items stored in separate variables.


Constant


Variable


Array


Loop


None of these

Array

Every element in an array is assigned a unique number known as a ________.


subscript


integer


character


number


None of these

subscript

Some programming languages provide this specialized loop that steps through an array, retrieving the value of each element.


While Each


For Each


Repeat Get


Step Loop


one of these

For Each