Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hiding the internal details of an object helps prevent the user from making inadvertent changes to the object. True False 1.5 points QUESTION 12 Bubble

Hiding the internal details of an object helps prevent the user from making inadvertent changes to the object.

True

False

1.5 points

QUESTION 12

Bubble sort and selection sort can also be used with vectors.

True

False

1.5 points

QUESTION 13

A constructor that has no formal parameters is called the default constructor.

True

False

1.5 points

QUESTION 14

Overloading is useful when two or more methods require different parameters to perform essentially the same task.

True

False

1.5 points

QUESTION 15

A(n) ____ is a group of variables that have the same name and data type and are related in some way.

a.

object

b.

scalar variable

c.

class

d.

array

1.5 points

QUESTION 16

You can visualize a(n) ____ as a column of variables.

a.

two-dimensional array

b.

scalar variable

c.

object

d.

one-dimensional array

1.5 points

QUESTION 17

A unique number called a(n) ____ identifies each variable in a one-dimensional array.

a.

subscript

b.

scalar

c.

pointer

d.

iterator

1.5 points

QUESTION 18

The first variable in a one-dimensional array is assigned a subscript of ____.

a.

NULL

b.

-1

c.

0

d.

1

1.5 points

QUESTION 19

A binary search begins by examining the ______ element of an ordered array.

a.

first

b.

middle

c.

largest

d.

last

1.5 points

QUESTION 20

____ declares and initializes a four-element string array named states; each element is initialized to the empty string.

a.

string states[] = {""};

b.

string [4]states = {""};

c.

string states[4] = {""};

d.

string states[4] = {};

1.5 points

QUESTION 21

____ declares and initializes a five-element double array named prices; the first element is initialized to 6.5, while the others are initialized to 0.0.

a.

double prices[] = {6.5,,,,};

b.

double prices[] = {6.5};

c.

double prices[5] = {6.5};

d.

double prices[5] = {6.5,,,,};

1.5 points

QUESTION 22

The linear search is adequate for searching through __________ arrays, but not through _____ arrays.

a.

char, string

b.

int, double

c.

small, large

d.

ascending, descending

1.5 points

QUESTION 23

To pass an array to a function, you need simply to enter the data type and name of the formal parameter, followed by an empty set of ____, in the receiving functions header.

a.

<>

b.

()

c.

[]

d.

{}

1.5 points

QUESTION 24

If a bubble sort is used to arrange the numbers 7 5 3 9 2 6 in ascending orders, what order will the data be in after the first pass?

a.

2 3 5 6 7 9

b.

5 7 3 9 2 6

c.

5 3 7 2 6 9

d.

2 5 3 9 7 6

1.5 points

QUESTION 25

A(n) ____ resembles a table in that the variables are in rows and columns.

a.

array of objects

b.

one-dimensional array

c.

two-dimensional array

d.

set of parallel arrays

1.5 points

QUESTION 26

The subscripts in a ____ specify the variables row and column position in the array(s).

a.

set of parallel arrays

b.

three-dimensional array

c.

one-dimensional array

d.

two-dimensional array

1.5 points

QUESTION 27

____ declares and initializes a three-row, two-column char array named grades.

a.

char grades[3][2] = {{'A', 'A'},{'B', 'C'},{'D', 'B'}};

b.

char grades[2][3] = {{'A', 'A'},{'B', 'C'},{'D', 'B'}};

c.

char grades[2,3] = {{'A', 'A'},{'B', 'C'},{'D', 'B'}};

d.

char grades[3,2] = {{'A', 'A'},{'B', 'C'},{'D', 'B'}};

1.5 points

QUESTION 28

To find a value that is in an unordered array of 50 items, a linear search must examine an average of ________ values.

a.

It depends on the data type of the values in the array

b.

50

c.

25

d.

10

1.5 points

QUESTION 29

Variables located in the first row in a two-dimensional array are assigned a row subscript of ____.

a.

NULL

b.

-1

c.

0

d.

1

1.5 points

QUESTION 30

The ____ are the characteristics that describe an object.

a.

interfaces

b.

behaviors

c.

attributes

d.

instances

1.5 points

QUESTION 31

Objects are said to be ____ from a class.

a.

created

b.

built

c.

implemented

d.

instantiated

1.5 points

QUESTION 32

In addition to using the classes built into C++, you also can define your own classes and then create instances (____) from those classes.

a.

capsules

b.

functions

c.

variables

d.

objects

1.5 points

QUESTION 33

The class statement begins with the keyword class followed by the name of the class, and it ends with a ____.

a.

.

b.

,

c.

;

d.

}

1.5 points

QUESTION 34

When you use a class to create an object in a program, only the ____ members of the class are exposed to the program.

a.

instance

b.

abstract

c.

private

d.

public

1.5 points

QUESTION 35

When a program needs to assign data to a private variable, it must use a public ______ to do so.

a.

declaration

b.

member variable

c.

accessor

d.

instance

1.5 points

QUESTION 36

Most programmers enter a class definition in a separate file called a(n) ____ file.

a.

directive

b.

header

c.

include

d.

definition

1.5 points

QUESTION 37

A(n) ____ is a method whose instructions the computer automatically processes each time an object is instantiated from the class.

a.

creator

b.

action

c.

instantiator

d.

constructor

1.5 points

QUESTION 38

____ is the scope resolution operator.

a.

*

b.

->

c.

::

d.

@

1.5 points

QUESTION 39

The keyword ____ indicates that a method does not return a value.

a.

void

b.

null

c.

false

d.

NULL

1.5 points

QUESTION 40

When two or more methods have the same name but different parameterLists, the methods are referred to as ____ functions.

a.

encapsulated

b.

twin

c.

overloaded

d.

default

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

1. Clarify your objectives.

Answered: 1 week ago