Within any object-oriented program, you continuously make requests to an object’s methods, often including arguments as part of those requests. T or F? |
True |
A parallel array is an array that stores another array in each element. T or F? |
False |
Declaring a named constant makes code easier to modify and understand. T or F? |
True |
Methods in object-oriented programs use sequence, selection, and looping structures and make use of arrays. T or F? |
True |
Many newer programming languages such as C++, Java, and C# use subscript 1 to access the first element of the array. T or F? |
False |
When you have a five element array and use subscript 6, your subscript is said to be out of bounds. T or F? |
True |
You use subscripts 1 through 10 to access the elements in a ten element array. T or F? |
False |
You can improve the efficiency of a program by leaving a loop as soon as a match is found in the array. T or F? |
True |
The accessor method is another name for the set method. T or F? |
False |
Many newer programming languages such as C++, Java, and C# use the square bracket notation for arrays. T or F? |
True |
Object-oriented programmers usually specify that their data fields will have private access. T or F? |
True |
Class diagrams consists of a rectangle divided into three sections. T or F? |
True |
All methods require a this reference. T or F? |
False |
Declaring a class does not create actual objects. T or F? |
True |
Parallel arrays must contain the same data type. T or F? |
False |
Arrays cannot be used if you need to search for a range of values. T or F? |
False |
In addition to their attributes, classes have methods associated with them, and every object instantiated from a given class possesses different methods. T or F? |
False |
The for loop is a good tool when working with arrays because you frequently need to process every element of an array from beginning to end. T or F? |
True |
Array elements all have the same ____ in common. |
d. data type |
The purpose of a(n) ____ is to return a value from the class to a client. |
a. get method |
One advantage to using a named constant is that the statement becomes ____. |
b. self-documenting |
To search an array for a(n) ____ match, you can store either the highest or lowest value |
d. range |
When methods have ____, other programs and methods may use the methods to get access to the private data. |
b. public access |
The true benefit of using an array lies in your ability to use a ____ as a subscript to the array. |
d. variable |
Object-oriented programmers sometimes say an object is one ____ of a class. |
b. instantiation |
Suppose that you have declared a numeric array named numbers, and two of its elements are numbers[1] and numbers[5]. You know that ____. |
d. there are exactly three elements between those two elements |
A ____ relates parallel arrays. |
c. subscript |
The purpose of ____ is to set or change the values of data fields defined within the class. |
d. set methods |
A(n) ____ is another name for a subscript. |
c. index |
In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses memory occupied by the array. |
b. subscript |
A(n) ____ is the adjective that defines the type of access (public or private) outside classes will have to the attribute or method. |
c. access specifier |
Every array has a(n) ____ size. |
b. finite |
The number of bytes in an array is always a multiple of the number of ____ in an array. |
b. elements |
The number of elements in an array is called the ____ of the array. |
b. size |
A(n) ____ is a programmer-defined type, such as a class. |
d. abstract data type |
____ is a programming model that focuses on an application’s components and data and methods the components use. |
d. Object-oriented programming — not sure |
The data components of a class that belong to every instantiated object are the class’s ____. |
c. instance variables |
An array can be used to replace ____. |
c. nested decisions |
Objects both in the real world and in object-oriented programming contain ____ and methods. |
b. attributes |
A ____ method is also known as a help method. |
a. work |
When a subscript is not within the range of acceptable subscripts, it is said to be ____. |
c. out of bounds |
____ are the characteristics of an object. |
b. Attributes |
The concept of a class is useful because of its ____. |
a. reusability |
Named ____ hold values that do not change during a program’s execution. |
a. constants |
Besides making your code easier to modify, using a ____ makes the code easier to understand. |
b. named constant |
All array elements have the same group ____. |
b. name |
When you think in an object-oriented manner, every object is a member of a more general ____. |
a. class |
Instance variables are often called ____ to help distinguish them from other variables you might use. |
d. fields |
Parallel arrays are most useful when value pairs have a(n) ____ relationship. |
b. indirect |
A(n) ____ consists of a rectangle divided into three sections. |
c. class diagram |
In all languages, subscript values must be sequential ____. |
d. integers |
A program contains an array that holds all the names of the days of the week. Which of the following is true? |
a. The highest subscript is 6. |
A(n) ____ is a program or class that instantiates objects of another prewritten class. |
c. class client |
Methods that set values are called ____ methods. |
b. mutator |
Which statement is true of arrays? |
a. Only whole numbers can be used as array |
A ____ is a set of program statements that lists the characteristics of each object and the methods each object can use. |
b. class definition |
In older object-oriented programming languages, simple numbers and characters are said to be ____ data types. |
a. primitive |
Providing array values is sometimes called ____. |
d. populating the array |
The process of combining all of an object’s attributes and methods into a single package is ____. |
a. encapsulation |
An array is a(n) ____ of values in computer memory. |
a. list |
If you declare a variable to be Boolean, you can set its value to ____. |
b. true or false |
62. Object-oriented programmers also use the term ____ when describing inheritance. |
c. is-a |
A ____ search starts looking in the middle of a sorted list, and then determines whether it should continue higher or lower. |
b. binary |
Another important concept in object-oriented programming is ________, which is the process of acquiring the traits of one’s predecessors. |
inheritance |
A subscript, also called a(n) ____________________, is a number that indicates the position of a particular item within an array. |
index |
All array elements have the same ____________________ name, but each individual element also has a unique subscript indicating how far away it is from the first element. |
group |
Use a(n) ____________________ to indicate the position of a particular item within an array. |
subscript or index |
A program or class that instantiates objects of another prewritten class is a ____________________ . |
class client |
A(n) ____________________ is one instance of a class. |
object |
When you think in an object-oriented manner, everything is a(n) ____________________. |
object |
When working with arrays, you can use ____________________ in several ways: To hold the size of an array, as the array values, and as a subscript . |
constants |
A(n) ____________________ is a variable set to indicate whether some event has occurred. |
flag |
____________________ is the process of combining all of an object’s attributes and methods into a single package. |
encapsulation |
Describes a group or collection of objects with common attributes |
class |
An instance of a class |
object |
The characteristics that define an object as part of a class |
attributes |
The data components of a class that belong to every instantiated object |
instance variables |
The set of all the values or contents of a class object’s instance variables |
state |
A program or class that instantiates objects of another prewritten class |
class client |
Simple numbers and characters |
primitive data types |
The process of acquiring the traits of one’s predecessors |
inheritance |
The process of combining all of an object’s attributes and methods into a single package |
encapsulation |
The concept that other classes should not alter an object’s attributes–only the methods of an object’s own class should have that privilege |
information hiding |
COP1000 Study Guide for Final
Share This
Unfinished tasks keep piling up?
Let us complete them for you. Quickly and professionally.
Check Price