MIS 120 test 2
sequential
(ans) access files are easy to work with, and you can use them to gain an understanding of basic file operations
Objects
(ans) are created from abstract data types that encapsulate data and functions together
procedural
(ans) programming is a method of writing software where it is centered on the procedures or actions that take place in a program
procedural
(ans) programming is centered on creating modules and functions
Data hiding
(ans) refers to an object's ability to hide its data from code that is outside that object
Encapsulation
(ans) refers to the combining of data and code into a single object.
Class
A (ans) is the blueprint of the object that is created from it
mutator
A method that stores a value in a field or changes the value of a field in some way is known as a (ans) method
Public
A methods that can be accessed by entities outside the object are known as (ans) methods
instance
Another term for an object of a class is
nouns
The starting point for finding the needed classes for a project is to identify all of the __________ in the problem statement / requirements.
-Declares array1 to be a reference to an array of double values -Creates an instance of an array of 10 double values -Will allow valid subscripts in the range of 0 - 9
What does the following statement do? double[] array1 = new double[10];
An error will occur at runtime.
What will be the results of the following code? final int ARRAY_SIZE = 5; double[] x = double[ARRAY_SIZE]; for(int i = 1; i <= ARRAY_SIZE; i++) { x[i] = 10.0; }
38
What will be the value of x[1] after the following code is executed? int[] x = {22, 33, 44}; arrayProcess(x); ... public static void arrayProcess(int[] a) { for(int k = 0; k < 3; k++) { a[k] = a[k] + 5; } }
33
What will be the value of x[1] after the following code is executed? int[] x = {22, 33, 44}; arrayProcess(x[1]); ... public static void arrayProcess(int a) { a = a + 5; }
sorting
a (ans) algorithm is a technique for stepping through an array and rearranged its contents in some order
text
a (ans) file contains data that has been encoded as text, using one of the computer's encoding schemes
class
a (ans) is a code that specified the fields and methods for a particular type of object
constructor
a (ans) is a method that automatically called when an object is created
Object names
a UML diagram does not contain (ans)
data type
all the values in an array must be of the same (ans)
array
an (ans) allows you to store a group of items of the same data type together in memory
object
an (ans) is not a stand-alone program, but is used by programs that need its service
list
arrays are designed to store and process a (ans) of data
subscript
by using the same (ans) a relationship can be established with the data stored between two or more arrays
records
data in a file is organized in (ans), which are a complete set of data about in an item
instance
each object that is created from a class is called an (ans) of the class
n/2
for an array of n items, the average number of comparisons in a sequential search (ans)
n
for an array of n items, the maximum number of comparisons in a sequential search is (ans)
control is returned to method c
if method A calls method B, and method B calls method C, and method C calls method D, when method D finishes, what happens
10
if the subscripts of an array go from 0 through 9, then the size of the array is (ans)
descending
if the values in an array are sorted in (ans) order, then they are stored from highest to lowest
ascending
if the values in an array are sorted in (ans) order, they are sorted from lowest to highest
0
in a selection sort, the first step is to move the smallest value in the array to element (ans) in order to sort the array in ascending order
relational
in a sorting algorithm, the sort order can be changes by changing the (ans) operator
parallelogram
in flowcharting, the (ans) symbol is used to read data from a file
erased
in most languages, if a file with the specified external name already exists when the file is opened, the contents of the existing file will be (ans)
nonnegative
in most programming languages, an array size declaratory must be a (ans) integer
bubble
in the bubble sort algorithm, the movement of the sorted values is commonly described as seeming to (ans) toward the end/beginning of the array
accumulator
loops are used to total the values in a numeric array, by which process the loop steps through the array adding the value of each array element to the (ans)
class
one or more objects may be created from an (ans)
two
passing an array as an argument requires that you pass (ans) arguments
bounds
programming languages perform array (ans) checking, which mean they do not allow a program to use an invalid array subscript
this is a public method with a parameter of data type double and does not return a value
what does the following UML diagram entry mean? +setHeight(h: double) : void
closes
when a program (ans) a file, it disconnects the file from the program
file
when a program needs to save data for later use, it writes the data to a (ans)
reading
when a program performs the task of retrieving data from a file, it is known as (ans) data from/to the file
selection
when placing the elements in an array in descending order, the (ans) sort begins by finding and placing the largest value in element 0
data types
you cannot store a mixture of (ans) in an array
the array must first be sorted in ascending order
In order to do a binary search on an array
fields
The data contained in an object are known as the object's (ans)
New
The key word (ans) creates the object in memory
constructors
The methods in an object that are used to initialize an object's fields with starting values are called (ans)
Public
The methods that can be accessed by entities outside the object are known as (ans) methods
reference
When using a module to swap the values in two variables, the arguments must be passed into (ans) parameters in the module
subscript
using a loop's counter variable as a (ans) makes it possible to perform the same action on each element in an array
output
the (ans) file is used to describe a file that data is written to
EOF
the (ans) marker indicates where the file's content ends
binary
the (ans) search algorithm locates an item in an array by repeatedly dividing the array in half
sequential
the (ans) search algorithm stops when the item is found or the end of the array is reached
extension or filename extension
the (ans) usually indicates the type of data stored in the file
sequential
the advantage of the (ans) searches in its simplicity
random
the direct access file is also known as a (ans) access file
variable
the first step in finding the highest value in an array is to create a (ans) to hold the highest value
zero
the first subscript in a one dimensional array is (ans)
Method
the objects (ans) are the modules and functions of the object
opening
the process of (ans) a file creates a connection between the file and the program
elements
the storage location in an array are known as (ans)
3
there are always (ans) steps that must be taken when a file is used by a program
temporary
to successfully swap the contents of two variables, we need a third variable that can serve as a (ans) storage location