Shared Flashcard Set

Details

CISP 300
Algorithm Design and Problem Solving
168
Computer Science
Undergraduate 1
06/21/2019

Additional Computer Science Flashcards

 


 

Cards

Term
255
Definition
What is the largest value that can be stored in one byte?
Term
Floating Point Notation
Definition
Used to encode real numbers to store them in the computer's memory.
Term
1011000 010100110
Definition
The following is an example of an instruction written in the machine language computer language:
Term
It translates and executes
Definition
Which of the following functions does an interpreter perform with the instructions from a high-level language?
Term
22
Definition
What is the value of the variable result in the following expression? Set result = (6+8)*4/2
Term
7
Definition
What is the value of the variable result in the following expression?
Set result =(6+8)/4*
Term
Pseudocode
Definition
The informal language used by programmers to create models of programs.
Term
Pseudocode
Definition
The informal language used by programmers to create models of programs.
Term
Debugging
Definition
The process of stepping through each of a programs statements, one by one, to see what each statement does is known as:
Term
All of the above
Definition
Which of the following would cause an error in a program?
attempting to store a floating-point value in a variable with an Integer data type
attempting to store an integer in a variable with a String data type
attempting to store a floating-point value in a variable with a String data type
Term
logic
Definition
Which of the following error types produce incorrect results but does not prevent the program from running?
Term
Function
Definition
Another name for a module is:
Term
score
Definition
Given the following pseudocode, which is the parameter?
Module main()
Call curveScore(82)
End Module
Module curveScore(Integer score)
Set newScore = score + 5
Display newScore
End Module
Term
local variable
Definition
An argument that is passed by a ______ ______ is not affected by a change to the content of the parameter variable.
Term
A hierarchy chart
Definition
Which of the following would a programmer use to visualize the relationship between modules?
Term
global variables
Definition
The use of ______ _________ may make programs hard to understand and debug.
Term
Programs which contain modules always run faster than programs without modules.
Definition
Which of the following is not a benefit of using modules when developing a program?
Term
header
Definition
The _________ is the first line of a module definition.
Term
82
Definition
Given the following pseudocode, which is the argument?

Module main()
Call curveScore(82)
End Module
Module curveScore(Integer score)
Declare Integer newScore
Set new Score = score + 5
Display newScore
End Module
Term
machine language
Definition
Each different type of CPU has its own ________ _________.
Term
web browser
Definition
Which of the following is not an example of application software?
Term
Two’s complement
Definition
_____ ____________ is the encoding technique used to store negative numbers in the computers memory.
Term
programmable
Definition
Computers can do many different jobs because they are ______________.
Term
operating system
Definition
A computer system consists of all of the following except the _________ ________.
Term
Syntax
Definition
__________ is the rules that must be followed when writing a program.
Term
userName is an invalid variable name.
Definition
What is the error in the following pseudocode?

Display “What is your name?”
Input userName
Declare String userName
Term
widgets has been declared as an Integer and cannot hold a floating-point value.
Definition
What is the error in the following pseudocode?
Declare Integer widgets
Declare Real cost
Set widgets = 3.5
Set cost = widgets *5
Term
design the program
Definition
What is the first step in the program development cycle?
Term
reference
Definition
When an argument is passed by _________, the parameter receives the address of the argument so both the argument and the parameter point to the same memory location.
Term
procedures, subprograms, functions, and methodsb.suboutines.
Definition
Modules may also be called:
Term
definition
Definition
To create a module, you write its _________.
Term
Hardware
Definition
___________ refers to the physical components that a computer is made of.
Term
compiles, translates
Definition
An interpreter _________ and _________ from any high-level language.
Term
Assembly
Definition
__________ is the computer language that uses mnemonics for writing programs.
Term
digital
Definition
The term _________ can be used to describe anything that uses binary numbers.
Term
Application Software
Definition
_________ __________ are programs that make a computer useful for everyday tasks.
Term
Unicode
Definition
___________ is an extensive encoding scheme that is compatible with ASCII.
Term
22
Definition
What is the value of the following expression: Set result = 6 + 8 * 4/2.
Term
Logic
Definition
________ produces an error type, but does not prevent the program from running.
Term
^
Definition
The ___ operator is used to raise 5 to the second power.
Term
15
Definition
What is the value of the following expression: Set result = 12 - 4 * 3/2 + 9.
Term
module definition
Definition
A ________ _________ consists of the module header and the module argument.
Term
hierarchy chart
Definition
A __________ _______ is used in order to visualize the relationship between modules.
Term
module,
Definition
To create a _______, you must write its definition.
Term
module
Definition
To execute a ________ you must call it.
Term
reference
Definition
When an argument is passed by _________, the parameter receives the address of the argument so both the argument and the parameter point to the same memory location.
Term
value
Definition
When an argument is passed by ______, only a copy of the argument’s value is passed into the parameter variable.
Term
module call
Definition
In a flowchart, a ______ ____ is represented by a rectangle symbol with vertical bars at each side.
Term
switch
Definition
In many languages, the case structure is called a ______ statement.
Term
AND and OR
Definition
Which two logical operators perform short-circuit evaluation?
Term
x >= 90 AND x <= 100
Definition
Which of the following expressions would check if a number, x, is between 90 and 100, inclusive?
Term
count controlled
Definition
The following is an example of a _____ __________ loop.
While x < 10
Set sum = sum + x
Set x = x + 1
End While
Term
loop body
Definition
Statements that appear between the While and End While statements are known as the ____ ____.
Term
condition-controlled
Definition
Which type of loop uses a Boolean expression to control the number of times a loop repeats?
Term
Infinite
Definition
How many times would the following loop iterate?
Set k = 1
While k <= 5
Display k
End While
Term
For
Definition
Which type of loop is specifically designed to initialize, test, and increment or decrement a counter variable?
Term
x < 90 OR x > 100
Definition
Which of the following expressions would check if a number, x, is outside the range 90 - 100, inclusive (i.e., either less than 90 or greater than 100)?
Term
NOT
Definition
The ___ operator is a unary operator which means it works with only one.
Term
diamond
Definition
In a flowchart, the _______ symbol indicates that some condition must be tested.
Term
True
Definition
What does the following expression evaluate to, given that a = 3 and b = 6?
(a != b) AND (b > a)
Term
0
Definition
How many times would the following loop iterate?
Set k = 1
While k > 5
Display k
End While
a. b.
Term
step amount
Definition
The amount by which the counter variable is incremented or decremented in a For loop is known as the ____ ______.
Term
loop body
Definition
Statements that appear between the While and End While statements are known as the ____ ____.
Term
Do-Until
Definition
Which type of loop repeats a statement or set of statements as long as the Boolean expression is false?
Term
NOT
Definition
If an expression is False, the ____ operator will return True.
Term
NOT
Definition
The _____ operator is a unary operator which means it works with only one operand.
Term
accumulation
Definition
A loop that accumulates a total as it reads each number from a series is often said to keep a(n) __________.
Term
3
Definition
How many times would the following loop iterate?
For j = 1 To 5 Step 2
Display j
End For
Term
Integer
Definition
What is the data type of the value returned by the random function?
Term
Contains
Definition
Which function accepts two strings as arguments and returns True if the second string is contained in the first string or False if not?
Term
pow
Definition
The ____ function does the same thing as using the mathematical ^ operator.
Term
isReal
Definition
Which function could be used to validate that the correct data type was input for an amount of money?
Term
date
Definition
Accepting February 29 for input only in a leap year is a check that should be caught by a __________ check.
Term
garbage in, garbage out
Definition
What do computer programmers say about the fact that computers can't tell the difference between good and bad data?
Term
contains
Definition
Which function accepts two strings as arguments and returns True if the second string is contained in the first string or False if not?
Term
defensive
Definition
Designing a program to avoid common errors is called __________ programming.
Term
date
Definition
Accepting February 29 for input only in a leap year is a check that should be caught by a __________ check.
Term
toLower
Definition
Which function could be used to simplify the process of string validation?
Term
the priming read
Definition
The purpose of __________ is to get the first input value for the validation of a loop.
Term
5
Definition
What is the value of y after the following statement is coded and executed, given that x = 25?
Set y = sqrt(x)
Term
substring
Definition
Which function returns a string that is within another string?
Term
body
Definition
A function __________ comprises one or more statements that are executed when the function is called.
Term
body
Definition
A function __________ comprises one or more statements that are executed when the function is called.
Term
toLower
Definition
Which function could be used to simplify the process of string validation?
Term
two
Definition
How many subscripts do you need to access one element in a two-dimensional array?
Term
Declare Real itemPrice[SIZE]
Definition
Which of the following array declarations would be best suited for storing prices of items sold in a store?
Term
subscript
Definition
Every element in an array is assigned a unique number known as a(n) __________.
Term
1
Definition
Given the following statement, what is the subscript for the data value 92?
Declare Integer numbers[5] = 83,92,78,94,61
Term
array bounds checking
Definition
When working with arrays most programming languages perform __________ to ensure that programs don't use invalid subscripts.
array bounds checking
Term
Amy your test score is: 83
Definition
What would display if following statements are coded and executed?

Declare Integer scores[3]= 76, 94, 83
Declare String names[3] = "Joe", "Amy", "Pat"
Display names[1]
Display "Your test score is: "
Display scores[2]
Term
x contains the value in y and y stayed the same.
Definition
Which of the following statements is true after the following statements are executed?
Term
insertion
Definition
The __________ sort algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array?
Term
local
Definition
In a swap module, the variable used as a temporary storage location is declared as a __________ variable.
Term
ascending
Definition
To order an array of strings in alphabetical order, the sorting algorithm should be structured to sort in __________ order.
Term
Answer: x and y have swapped their values.
Definition
Which of the following statements is true after the following statements are executed?

Set t = x
Set x = y
Set y = t
Term
Answer: Amy your test score is: 83
Definition
What would display if the following statements are coded and executed?

Declare Integer scores[3]= 76, 94, 83
Declare String names[3] = "Joe", "Amy", "Pat"
Display names[1]
Display "Your test score is: "
Display scores[2]
Term
For Each
Definition
A type of loop that exists in some programming languages specifically for stepping through an array and retrieving the value of each element is known as a __________ loop.
Term
Two dimensional
Definition
__________ arrays are two or more arrays that hold related data where each element of one array has the same subscript as a corresponding element in the other arrays.
Term
insertion
Definition
The __________ sort algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array?
Term
4
Definition
In a bubble sort that is sorting an array named scores in ascending order, what would be the index of the element with the value 93 at the end of the first outer pass?
Declare Integer scores[6] = 89, 52, 93, 78, 86
Term
The original value of x
Definition
What is the value of t after the following statements are executed?

Set t = x
Set x = y
Set y = t
Term
x and y have swapped their values
Definition
Which of the following statements is true after the following statements are executed?
Set t = x
Set x = y
Set y = t
Term
the subscript of the middle element or the average of two middle elements in the portion being searched
Definition
In the pseudocode of the textbook, what does the variable middle represent in a binary sort algorithm?
Term
Set getAverage = average(studentScores[25])
Definition
Which is the correct way to pass an array named studentScores that holds 25 values to a function named getAverage and save the result to a variable named average?
Term
subscript
Definition
An individual element in an array is identified by its __________.
Term
This is an array declaration and initialization
Definition
Which of the following statements is true about this array declaration?
Declare Integer numbers[5] = 123,456,789,321,654
Term
rows and columns
Definition
Two-dimensional arrays can be thought of as containing __________.
Term
x contains the value in y and y stayed the same.
Definition
Which of the following statements is true after the following statements are executed?

Set x = y
Set y = x
Term
descending
Definition
In an insertion sort, what order are the elements in an array named array placed using the following Boolean expression?

// variable p is used to scan the array
While p > 0 AND array[p - 1] > array[p]
Term
bubble sort
Definition
Which of the following is the least efficient sorting algorithm for large arrays?
Term
array[index] and array[index + 1]
Definition
In the bubble sort algorithm, given an array named array and the variable that holds the subscript is named index, the two arguments sent into the swap module are __________.
Term
Open, Read
Definition
In order to process the data in a file, first you must __________ the file and then __________ the data into memory
Term
Delimeter
Definition
A character or set of characters that marks the end of a piece of data is known as a(n) __________.
Term
The string "widgets" will be written to the file associated with itemsOrdered.
Definition
In the pseudocode of the textbook, what does the following statement indicate?

Write itemsOrdered "widgets"
Term
sequential
Definition
When using __________ access, access to the data starts at the beginning of the file and proceeds through all the records to the end of the file.
Term
Do-While
Definition
In a __________ loop the menu will be displayed at least once.
Term
graphical user interface
Definition
The acronym GUI stands for __________.
Term
modules
Definition
Menu-driven programs should be broken down into __________ that perform individual tasks
Term
output
Definition
Opening a(n) __________ file creates a file on disk and allows the program to write data to it
Term
itemsOrdered is the internal name used to work with the contents of a file.
Definition
In the pseudocode of the textbook, what does the following statement indicate?

Declare OutputFile itemsOrdered
Term
eof(myStuff) == False
Definition
Which of the following expressions is equivalent to the pseudocode shown here?

NOT eof(myStuff).
Term
accepts a file's internal name as an argument and returns True if the end of the file has been reached
Definition
The eof function:
Term
binary file
Definition
Which type of file cannot be viewed in a text editor such as Notepad?
Term
case
Definition
A(n) __________ statement provides a default section to validate a user's menu selection.
Term
number
Definition
The items displayed in a menu are often preceded by a(n) __________.
Term
multiple-level
Definition
A __________ menu first displays the main menu and then, based on the user's selection, displays a submenu.
Term
multiple-level
Definition
A menu-driven program that has a main menu and several submenus is known as a __________ menu.
Term
direct
Definition
When using __________ access, the code can access any piece of data without reading all the data that came before it in the file.
Term
submenu
Definition
When a user makes a selection from the main menu in a multiple-level menu, a __________ would probably be displayed next.
Term
case
Definition
A(n) __________ statement provides a default section to validate a user's menu selection
Term
infinite
Definition
If a recursive module has no code to stop it from repeating, then it is like an ________ loop.
Term
at least one case in which the problem can be solved without recursion.
Definition
The first step in setting up a recursive module is to identify ____________.
Term
design
Definition
The choice of whether to use recursion or a loop to solve a specific programming problem is primarily a _________ decision.
Term
ninth call.
Definition
If a recursive module calls itself ten times, after the tenth call it returns to the ___________.
Term
instance
Definition
Each time a recursive module calls itself, it creates a new __________ of the parameters of the module.
Term
False
Definition
When a recursive module makes the last call to itself, the If-Then statement's condition expression is ________.
Term
loop structure
Definition
A recursive module is similar to a ____________ in that it must have some way to control the number of times it repeats.
Term
+
Definition
In a UML diagram the___ character, placed in front of a field or method name, indicates that it is Public.
Term
definition
Definition
In the pseudocode of the textbook, a class __________ starts with the word Class, followed by the name of the class.
Term
access specifier
Definition
In a class definition, if the word Private appears before a field declaration, Private is known as an ______________.
Term
Object-oriented
Definition
________________ programming encapsulates data and functions in an object.
Term
depth
Definition
The total number of times a module calls itself recursively is known as the __________ of recursion
Term
recursive
Definition
In the _________ case, the problem is reduced to a smaller version of the original problem.
Term
infinite
Definition
If a recursive module has no code to stop it from repeating, then it is like an __________ loop.
Term
Sedans, Vehicles.
Definition
Given a base class named Vehicles and a derived class named Sedans, ________ can inherit from _________.
Term
controls
Definition
GUI components are known as __________.
Term
graphical user
Definition
A __________ interface allows the user to interact with the operating system and other programs by using graphical elements.
Term
Radio button
Definition
The component that usually appears in a group to allow the user to select one of several options and can be either selected or deselected is a ____________.
Term
init
Definition
The module that allows the programmer to perform some actions as soon as a GUI application begins executing is known, in the textbook's pseudocode, as the ______ module.
Term
variables
Definition
In most programming languages the rules for naming components are the same as the rules for naming ___________.
Term
definition
Definition
The fields and methods that belong in a class are known as the class's _________.
Term
fields
Definition
The variables, arrays, or other data structures that are stored in an object are known as the object's _______.
Term
setters
Definition
Mutator methods are sometimes called ________.
Term
sketch the window
Definition
What is the first step that should be taken when constructing a window?
Term
event-driven
Definition
When a GUI program responds to the actions of a user, it is said to be an ______________ program.
Term
init
Definition
The module that allows the programmer to perform some actions as soon as a GUI application begins executing is known, in the textbook's pseudocode, as the _____ module.
Term
buttons
Definition
In most programming languages the rules for naming components are the same as the rules for naming _________.
Term
graphical menu
Definition
A _______________ interface displays a prompt to allow the user to type a command which is then executed.
Term
constructor
Definition
The _____________ method is automatically called when an object is created.
Term
Procedural
Definition
__________ programming is centered on the procedures or actions that take place in a program.
Term
members
Definition
The fields and methods that belong in a class are known as the class's ____________.
Term
Set ducky = New Animals()
Definition
Given a class named Animals and a class variable named ducky which will reference an Animals object, which is the correct way, using the textbook's pseudocode, to create an Animals object?
Term
Inhertitance
Definition
__________ allows a new class to extend an existing class.
Term
values
Definition
Like variables, a component's properties can be set to ________.
Term
properties
Definition
Each GUI component has a set of _________ that determine how the component appears on the screen.
Term
flow
Definition
A user interface _______ diagram assists a programmer by depicting the flow from one window to another in a GUI program.
Term
dialog
Definition
Small windows that display information and allow the user to perform actions are known as _______ boxes.
Term
command line
Definition
A ____________ interface displays a prompt to allow the user to type a command which is then executed.
Supporting users have an ad free experience!