Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUIZ: Chapter 1 Data Abstraction: The Walls The specifications of an ADT’s opera

ID: 3877592 • Letter: Q

Question

QUIZ: Chapter 1 Data Abstraction: The Walls

The specifications of an ADT’s operations indicate ______.

what the operations do

how to implement the operations

how to store the data in the ADT

how to carry out the operations

Data structures are part of an ADT’s ______.

definition

implementation

specifications

usage

A(n) ______ allows two modules to communicate with each other.

data structure

axiom

interface

client

An ADT’s ______ govern(s) what its operations are and what they do.

specifications

implementation

documentation

data structure

A client program depends solely on the ______ of the ADT.

data members

structure

implementation

behavior

Object-oriented programming views a program as ______.

a sequence of actions

a collection of classes

a group of methods

an interaction among objects

An ADT’s operations are known as its ______.

axioms

methods

variables

interfaces

Encapsulation combines an ADT’s data with its operations to form a(n) ______.

exception

method

object

variable

A(n) ______ is a C++ construct that enables a programmer to define a new data type.

class

method

data field

object

A C++ class contains data members and ______.

clients

interfaces

methods

data structures

A(n) ______ is an instance of a class.

method

data field

interface

object

Which of the following is true about a constructor in C++?

all constructors have a return type of void

a constructor cannot have parameters

a constructor has the same name as the class

a class can only have a single constructor

A(n) ______ is a class that inherits the members of another class.

base class

superclass

abstract class

subclass

Which of the following is true about a destructor in C++?

a class can have several destructors

the compiler will generate a destructor if the programmer does not provide one

a programmer must provide a destructor for every class

a destructor destroys all instances of a class

In C++, each class definition should be placed in a(n) ______.

implementation file

header file

namespace

package

C++ provides a mechanism for logically grouping class definitions and other declarations into a common declarative region known as a(n) ______.

namespace

interface

header

package

When defining class A so that any of its instances can invoke any of the publicly defined methods of class B, the keyword ______ precedes the name of class B.

public

global

static

final

A function can indicate that an error has occurred by ______ an exception.

throwing

catching

implementing

declaring

To ______ an exception means to deal with the error condition.

declare

catch

implement

try

Which of the following is true about runtime exceptions?

they must be handled locally

they must be explicitly thrown from the method

they are used in situations where the method has encountered a serious problem

they can often be prevented by fail-safe programming

Short Answer Questions

What are some of the benefits of modularity?

What is information hiding?

What are the three types of operations on a data collection?

What is data abstraction?

What is an abstract data type (ADT)?

What is a data structure?

What is a constructor?

Under what circumstance is a compiler-generated default constructor created?

Define the client of a class?

What is a superclass?

Explanation / Answer

The specifications of an ADT’s operations indicate

Ans) The Answer is what the operations do

Data structures are part of an ADT’s

Ans) The Answer is implementation

A(n) ______ allows two modules to communicate with each other.

Ans) The Answer is interface

An ADT’s ______ govern(s) what its operations are and what they do.

Ans) The Answer is specifications

A client program depends solely on the ______ of the ADT.

Ans) The Answer is behavior

Object-oriented programming views a program as __

Ans) The Answer is an interaction among objects

An ADT’s operations are known as its

Ans) The Answer is methods


According to chegg rules we should answer only first four questions, but i have answered seven questions, you can post the remaining questions as a separate questions, hope you understand and please co-operate with us.

Hope This Helps, if you have any doubts Please comment i will get back to you, thank you and please thumbs up