MIS120

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

instance

13. Each object that is created from a class is called a(n) _________ of the class.

file

18. When a program needs to save data for later use, it writes the data to a ________.

output

19. The ________ file is used to describe a file that data is written to.

erased

31. 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 ____________.

sequential

5. The advantage of the _________ search is its simplicity.

data types

57. You cannot store a mixture of ____________ in an array.

nonnegative

58. In most programming languages, an array size declarator must be a ________ integer.

object names

A UML diagram does not contain:

text

A ________ file contains data that has been encoded as text, using one of the computer's encoding schemes.

constructor

A ________ is a method that automatically called when an object is created.

class

A __________ is code that specifies the fields and methods for a particular type of object.

access

A method that gets a value from a class's field but does not change it is known as a(n) ____________ method.

mutator

A method that stores a value in a field or changes the value of a field in some way is known as __________ method.

sorting

A(n) _____________ algorithm is a technique for stepping through an array and rearranging its contents in some order.

data type

All the values in an array must be of the same _____________.

array

An ______ allows you to store a group of items of the same data type together in memory.

object

An ________ is not a stand-alone program, but is used by programs that need its service.

instance

Another term for an object of a class is:

list

Arrays are designed to store and process a ________ of data.

Three steps must take place for file interaction

Open the file. An output file means creating and prepare it for output; an input file means opening a file and prepare it for reading data from Process the file. Writes data to the file or reads data from the file Close the file. Must be done to disconnect it from the program

two -- in most cases you need to pass the count variable for partially filled arrays

Passing an array as an argument requires that you pass ___________ argument(s).

bounds

Programming languages perform array ________ checking, which means they do not allow a program to use an invalid array subscript.

Nouns

The starting point for finding the needed classes for a project is to identify all of the __________ in the problem statement / requirements.

elements

The storage locations in an array are known as _________________.

three

There are always ________ 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 ____________ storage location.

subscript

Using a loop's counter variable as a ____________ makes it possible to perform the same action on each element in an array.

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?

A) Declares array1 to be a reference to an array of double values B) Creates an instance of an array of 10 double values C) 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; }

Procedural

__________ programming is centered on creating modules and functions.

Objects

___________ are created from abstract data types that encapsulate data and functions together.

Sequential

____________ access files are easy to work with, and you can use them to gain an understanding of basic file operations.

Procedural

____________ programming is a method of writing software where it is centered on the procedures or actions that take place in a program.

Data hiding

____________ refers to an object's ability to hide its data from code that is outside the object.

Encapsulation

______________ refers to the combining of data and code into a single object.

binary search

algorithm locates an item in an array by repeatedly dividing the array in half -Each time it divides the array, it eliminates the half of the array that does not contain the item -It's more sequential than the selection search because each time it cuts the array in half and makes a smaller number of comparisons to find a match

sequential Search

is a simple technique for finding an item in a string or numeric array -Uses a loop to sequentially step through an array -Compares each element with the value being searched for -Stops when the value is found or the end of the array is hit

class

is code that describes a particular type of object. It specifies the data that an object can hold (the object's fields), and the actions that an object can perform (the object's methods).

selection sort

works similar to the bubble sort, but more efficient -Bubble sort moves one element at a time -____________ performs fewer swaps because it moves items immediately to their final position

descending

If the values in an array are sorted in ___________ order, then they are stored from highest to lowest.

ascending

If the values in an array are sorted in ____________ order, they are sorted from lowest to highest.

class

One or more objects may be created from a(n):

subscripts

By using the same _____________, a relationship can be established with the data stored between two or more arrays

records

Data in a file is organized in _______, which are a complete set of data about an item.

n/2

For an array of n items, the average number of comparisons in a sequential search is _______.

n

For an array of n items, the maximum number of comparisons in a sequential search is ______.

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 ________.

0

In a selection sort, the first step is to move the smallest value in the array to element _______, in order to sort the array in ascending order.

relational

In a sorting algorithm, the sort order can be changed by changing the ________________ operator.

parallelogram

In flowcharting, the _________ symbol is used to read data from a file.

the array must first be sorted in ascending order

In order to do a binary search on an array:

bubble

In the bubble sort algorithm, the movement of the sorted values is commonly described as seeming to __________ 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 ____________.

EOF or end-of-file

The _________ marker indicates where the file's content ends.

binary

The _________ search algorithm locates an item in an array by repeatedly dividing the array in half.

sequential

The ______________ search algorithm stops when the item is found or the end of the array is reached.

extension or filename extension

The ________________ usually indicates the type of data stored in the file.

sequential

The advantage of the _________ search is its simplicity.

random

The direct access file is also known as a ___________ access file.

variable

The first step in finding the highest value in an array is to create a ____________ to hold the highest value.

zero

The first subscript in a one-dimensional array is ________________.

New

The key word ___________ 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 ________________.

public

The methods that can be accessed by entities outside the object are known as _________ methods.

mutators(getter)

The methods that modify the data of fields are called

accessors(setter)

The methods that retrieve the data of fields are called

methods

The object's ___________ are the modules and functions of the object

opening

The process of ________ a file creates a connection between the file and the program.

closes

When a program ________ a file, it disconnects the file from the program

reading

When a program performs the task of retrieving data from a file, it is known as __________ data from/to the file.

selection

When placing the elements in an array in descending order, the __________ sort begins by finding and placing the largest value in element 0.

Private

When the ____________ access specifier is applied to a class member, the member cannot be accessed by code outside the class. The member can be accessed only by methods that are members of the same class.

Public

When the _______________ access specifier is applied to a class member, the member can be accessed by code inside the class or outside.

reference

When using a module to swap the values in two variables, the arguments must be passed into __________ parameters in the module.

the two types of files

text and binary


Ensembles d'études connexes

Vision and Hearing Problems in the Older Adult

View Set

AP Lang - Mark Twain (Corn-Pone Opinions)

View Set

What is the Purpose of Government

View Set

Texas Real Estate Finance - Chapter 6

View Set