1 a classs members can only be used by its own methods and


Multiple choices needs the answer for this assignment

1. A class's ______ members can only be used by its own methods and friends.

a.  public

b.  protected

c.  private

d.  final

 

2.A derived class in C++ can have more than one base class.

a.  True

b.  False

 

3.  The specifications of an ADT's operations indicate ______.

a.  what the operations do

b.  how to implement the operations

c.  how to store the data in the ADT

d.  how to carry out the operations

 

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

a.  data structure

b.  axiom

c.  interface

d.  client

 

5. In the following list: John, Kate, Fred, Mark, Jon, Adam, Drew which element is the tail of the list?

a.  John

b.  Mark

c.  Drew

d.  Adam

 

6. Which element is the head of the following list: John, Kate, Fred, Mark, Jon, Adam, Drew?

a.  John

b.  Mark

c.  Drew

d.  Adam

 

7.  Data structures are part of an ADT's ______.

a.  definition

b.  implementation

c.  specifications

d.  usage

 

8.   The insertion operation of the ADT list can insert new items ______.

a.  only at the front of the list

b.  only at the end of the list

c.  only in the middle of the list

d.  into any position of the list

 

9.In the ADT list, when an item is deleted from position i of the list, ______.

a.  the position of all items is decreased by 1

b. the position of each item that was at a position smaller than i is decreased by 1

c. the position of each item that was at a position greater than i is decreased by 1

d. the position of each item that was at a position smaller than i is increased by 1 while the position of each item that was at a position greater than i is decreased by 1

 

10.  Which of the following class declarations indicates that Ball is a derived class of Sphere?

a.  class Sphere: public Ball

b.  class Ball: public Sphere

c.  class Ball::Sphere

d.  class Ball(Sphere)

 

11.  In ______ inheritance, public and protected members of the base class are private members of the derived class.

a.  private

b.  public

c.  conditional

d.  protected

 

12.   ______ is the ability of a class to derive properties from a previously defined class.

a.  Encapsulation

b.  Simulation

c.  Inheritance

d.  Polymorphism

 

13.  hich of the following declares a list of characters using a class template?

a. char charList;

b. List charList;

c. List charList;

d. List(char) charList;

 

 

14. The items in the ADT list are referenced by ______.

a.  name

b.  value

c.  position number

d.  position name

 

15.In the following list: John, Kate, Fred, Mark, Jon, Adam, Drew which element does not have a predecessor?

a.  John

b.  Mark

c.  Drew

d.  Kate

 

16.  A ______ method is one that a derived class can override.

a.  final

b.  base

c.  static

d.  virtual

 

17.  An abstract base class cannot have ______.

a.  descendants

b.  instances

c.  data members

d.  virtual methods

 

18.The class from which another class is derived is known as the ______.

a.  base class

b.  subclass

c.  child class

d.  derived class

 

19. Which of the following is a common iterator operation that moves an iterator to the next item in the list?

a.  ++

b.  --

c.  *

d.  +

 

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

a.  specifications

b.  implementation

c.  documentation

d.  data structure

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: 1 a classs members can only be used by its own methods and
Reference No:- TGS01215251

Expected delivery within 24 Hours