COP1000 Study Guide for Final

Your page rank:

Total word count: 1883
Pages: 7

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

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.
a. pointer
b. memory location
c. value
d. data type

d. data type

The purpose of a(n) ____ is to return a value from the class to a client.
a. get method
b. set method
c. pull method
d. access method

a. get method

One advantage to using a named constant is that the statement becomes ____.
a. self-perpetuating
b. self-documenting
c. self-referencing
d. self-mitigating

b. self-documenting

To search an array for a(n) ____ match, you can store either the highest or lowest value
of each range for comparison.
a. flag
b. index
c. subscript
d. range

d. range

When methods have ____, other programs and methods may use the methods to get access to the private data.
a. private access
b. public access
c. complete access
d. all access

b. public access

The true benefit of using an array lies in your ability to use a ____ as a subscript to the array.
a. constant
b. loop
c. command
d. variable

d. variable

Object-oriented programmers sometimes say an object is one ____ of a class.
a. enumeration
b. instantiation
c. member
d. reference

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

a. numbers[1] is smaller than numbers[5]
b. there are exactly four elements between those two elements
c. numbers[5] is the last element in the array
d. there are exactly three elements between those two elements

d. there are exactly three elements between those two elements

A ____ relates parallel arrays.
a. superscript
b. key
c. subscript
d. postscript

c. subscript

The purpose of ____ is to set or change the values of data fields defined within the class.
a. get methods
b. put methods
c. make methods
d. set methods

d. set methods

A(n) ____ is another name for a subscript.
a. pointer
b. sequence
c. index
d. place holder

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.
a. superscript
b. subscript
c. key
d. condition

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.
a. control specifier
b. control modifier
c. access specifier
d. access controller

c. access specifier

Every array has a(n) ____ size.
a. infinite
b. finite
c. variable
d. constant

b. finite

The number of bytes in an array is always a multiple of the number of ____ in an array.
a. subscripts
b. elements
c. iterators
d. indexes

b. elements

The number of elements in an array is called the ____ of the array.
a. width
b. size
c. height
d. depth

b. size

A(n) ____ is a programmer-defined type, such as a class.
a. inheritance
b. numeric data type
c. primitive data type
d. abstract data type

d. abstract data type

____ is a programming model that focuses on an application’s components and data and methods the components use.
a. Classical programming
b. Functional programming
c. Procedural programming
d. Object-oriented programming

d. Object-oriented programming — not sure

The data components of a class that belong to every instantiated object are the class’s ____.
a. numeric variables
b. string variables
c. instance variables
d. data variables

c. instance variables

An array can be used to replace ____.
a. records
b. methods
c. nested decisions
d. loops

c. nested decisions

Objects both in the real world and in object-oriented programming contain ____ and methods.
a. behaviors
b. attributes
c. help
d. primitive data types

b. attributes

A ____ method is also known as a help method.
a. work
b. private
c. public
d. set

a. work

When a subscript is not within the range of acceptable subscripts, it is said to be ____.
a. a superscript
b. flagged
c. out of bounds
d. indexed

c. out of bounds

____ are the characteristics of an object.
a. Instances
b. Attributes
c. Behaviors
d. Methods

b. Attributes

The concept of a class is useful because of its ____.
a. reusability
b. mapping to reality
c. abstract nature
d. portability

a. reusability

Named ____ hold values that do not change during a program’s execution.
a. constants
b. variables
c. objects
d. items

a. constants

Besides making your code easier to modify, using a ____ makes the code easier to understand.
a. standard constant
b. named constant
c. literal constant
d. named variable

b. named constant

All array elements have the same group ____.
a. subscript
b. name
c. memory location
d. value

b. name

When you think in an object-oriented manner, every object is a member of a more general ____.
a. class
b. struct
c. method
d. collection

a. class

Instance variables are often called ____ to help distinguish them from other variables you might use.
a. rows
b. records
c. columns
d. fields

d. fields

Parallel arrays are most useful when value pairs have a(n) ____ relationship.
a. direct
b. indirect
c. linked
d. tiered

b. indirect

A(n) ____ consists of a rectangle divided into three sections.
a. class tree
b. dependency diagram
c. class diagram
d. entity-relationship diagram

c. class diagram

In all languages, subscript values must be sequential ____.
a. characters
b. fractions
c. real numbers
d. integers

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.
b. The highest subscript is 7.
c. The lowest subscript is 1.
d. The highest subscript is 12.

a. The highest subscript is 6.

A(n) ____ is a program or class that instantiates objects of another prewritten class.
a. instantiation
b. method
c. class client
d. class definition

c. class client

Methods that set values are called ____ methods.
a. modifier
b. mutator
c. creator
d. access

b. mutator

Which statement is true of arrays?
a. Only whole numbers can be used as array
b. Only whole numbers can be stored in arrays.
c. Arrays cause more work for the programmer, but allow faster program execution.
d. Array elements cannot be reset after the array is declared.

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.
a. class interface
b. class definition
c. class reference
d. class model

b. class definition

In older object-oriented programming languages, simple numbers and characters are said to be ____ data types.
a. primitive
b. simple
c. complex
d. higher-order

a. primitive

Providing array values is sometimes called ____.
a. creating the array
b. declaring the array
c. accumulating the array
d. populating the array

d. populating the array

The process of combining all of an object’s attributes and methods into a single package is ____.
a. encapsulation
b. inheritance
c. information hiding
d. data hiding

a. encapsulation

An array is a(n) ____ of values in computer memory.
a. list
b. accumulation
c. set
d. record

a. list

If you declare a variable to be Boolean, you can set its value to ____.
a. any number
b. true or false
c. any integer
d. 1 or -1

b. true or false

62. Object-oriented programmers also use the term ____ when describing inheritance.
a. has-a
b. from-a
c. is-a
d. contains

c. is-a

A ____ search starts looking in the middle of a sorted list, and then determines whether it should continue higher or lower.
a. linear
b. binary
c. quadratic
d. divided

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

Share This
Flashcard

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more

NCLEX 300-NEURO

A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price

Successful message
sending