Exam 3 - Chapter 11/12 (Missing 43 :/)

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is NOT true about abstract classes and abstract methods? A. Abstract classes cannot be instantiated as is B. Abstract classes must define their declared methods C. An abstract class must have at least one abstract method D. Instantiated classes of abstract classes must define all abstract methods E. Abstract classes must include at least one concrete method

Abstract classes must include at least one concrete method

Which is NOT a true statement about the common traits of C++ and Java? A. Both allow classes to be defined without requiring a parent class B. Both require a parent class constructor to be called before a child class constructor is called C. Both support object and non-object data D. Both support object-oriented programming paradigms E. Both support single inheritance

Both allow classes to be defined without requiring a parent class

C# uses the syntax of _____ for defining classes. A. Java B. Python C. Objective-C D. C++ E. C structure

C++

In which of the following language supporting multiple inheritance requires just one additional array access and one extra addition operation for each dynamically bound method call, at least with some machine architectures? A. C++ B. Ruby C. JavaScript D. Prolog E. Javascript

C++

Which of the following was the first widely used object-oriented programming language and is still one of the most popular programming languages? A. Fortran B. COBOL C. C++ D. C E. Smalltalk

C++

____ offers a solution to both the modification problem posed by abstract data type reuse and the program organization problem. A. Abstraction B. Polymorphism C. Inheritance D. Encapsulation E. Type

Inheritance

_____ operate only on the objects of the class. A. Class methods B. Class variables C. Instance methods D. Instance variables E. virtual methods

Instance methods

What structures in Java provide partial support for multiple inheritance? A. Categories B. Classes C. Closures D. Interfaces E. Containers

Interfaces

C# includes both classes and structs, with the classes being very similar to _______ classes and the structs being somewhat less powerful stack-dynamic constructs. A. C B. C++ C. Java D. JavaScript E. Python

Java

Arguments are passed to the base class destructor function by the _____ class _______ function. A. derived, constructor B. derived, destructor C. base, constructor D. base, destructor E. None of these

None of these

______ members of a base class are never accessible to a derived class. A. Public B. Private C. Protected D. a, b, and c E. None of these

Private

What was the first language to offer complete support for object- oriented programming? A. Python B. C C. Smalltalk D. Java E. Algol

Smalltalk

For Java - (1) actual class, (2) abstract class, and (3) interface, answer properly and best for what is "this". This can define instance variables and methods: (1) ___ for Actual Class, (2) ___ for Abstract Class, (3) ___ for Interface A. Yes, No, No B. Yes, Yes, No C. Yes, No, Yes D. Yes, Yes, Yes E. None of the above

Yes, Yes, No

For Java - (1) actual class, (2) abstract class, and (3) interface, answer properly and best for what is "this". This can define constants: (1) ___ for Actual Class, (2) ___ for Abstract Class, (3) ___ for Interface A. Yes, No, No B. Yes, Yes, No C. Yes, No, Yes D. Yes, Yes, Yes E. None of the above

Yes, Yes, Yes

A class that includes at least one abstract method is called _____. A. interface B. base class C. inheritance D. abstract class E. abnormal class

abstract class

A language that is object oriented must provide support for this ____ key language features? A. abstract data types B. inheritance C. dynamic binding of method calls to methods D. encapsulation E. All of the Above

all of the above

Multiple inheritance opens the opportunity for a derived class to have ______ members. A. dynamic B. private C. public D. ambiguous E. None of these

ambiguous

The _____ constructor is called before the _____ constructor. A. base, derived B. derived, base C. public, private D. private, public E. None of these

base, derived

In Java, what is the process of implicitly coercing a primitive value into object context called? A. Boxing B. Closure C. Encapsulation D. Objectifying E. Subtyping

boxing

In C++, classes are defined as extensions of C's record structures—structs. This form of this structure (for the instance variables of class) is called a ____. A. class container B. class virtual table C. class factory D. class instance record E. class structure library

class instance record

The abstract data types in object-oriented languages, following the lead of SIMULA 67, are usually called _____. A. classes B. objects C. functions D. methods E. interfaces

classes

What is NOT a key feature of object-oriented programming? A. Abstract data types B. Closures C. Dynamic binding D. Inheritance

closures

In the C++ definition of an inherited class, the name of the inherited class has the name of the base class attached with what symbol? A. Ampersand B. Colon C. Comma D. Semicolon

colon

In C++, what operator is used to explicitly deallocate heap-dynamic objects? A. deallocate B. delete C. new D. remove E. free

delete

The _____ destructor is called before the _____ destructor. A. base, derived B. derived, base C. public, private D. private, public E. None of these

derived, base

Visibility in explicit way: private, protected, public, or default (package). Select the best choices for (7) where there are two answers. A. Applicable to inner classes B. Accessible only to members of the class in which it is declared. C. Visible to classes in this package D. Visible to classes outside the package that extend this class. E. Visible to all classes. F. Visible only within this class G. Visible to all classes where the class defining the member must also be public.

dont know

The compiler performs ______ on virtual functions. A. static binding B. dynamic binding C. additional error checking D. no special services E. None of these

dynamic binding

The third characteristic (after abstract data types and inheritance) of object oriented programming languages is a kind of polymorphism provided by the dynamic binding of messages to method definitions. This is sometimes called ______. A. static dispatch B. dynamic dispatch C. heap allocated D. dynamic encapsulation E. dynamic polymorphism

dynamic dispatch

The ____ attached to the name of the setter method means that its variable is assignable. A. less than sign ( < ) B. equal sign (=) C. greater than sign ( > ) D. dot sign ( . )

equal sign (=)

All Java objects are ____. A. explicit heap dynamic B. implicit heap dynamic C. stack dynamic D. static

explicit heap dynamic

What keyword in Java ensures a class cannot be derived from to make inherited classes? A. abstract B. final C. finalize D. ultimate E. const F. static

final

What is a primary purpose for the use of nested classes? A. Abstraction B. Information hiding C. Inheritance D. Polymorphism E. Subtyping

information hiding

Non-static classes that are nested directly in another class are called _______. A. outer classes B. inner classes C. external classes D. internal classes E. virtual classes

inner classes

The entire collection of methods of an object is called the _____ of the object. A. object protocol or object interface B. message protocol or message interface C. function protocol or function interface D. class protocol or class interface E. container F. factory

message protocol or message interface

The calls to methods are sometimes called ______. A. messages B. objects C. functions D. classes E. interfaces F. services

messages

The subprograms that define the operations on objects of a class are called _______. A. classes B. objects C. functions D. methods E. constructors

methods

The class in which the new class is nested is called the _______. A. complex class B. nesting class C. subclass D. superclass E. complex class

nesting class

The concept of ______ had its roots in SIMULA 67 but was not fully developed until the evolution of Smalltalk resulted in Smalltalk 80? A. functional programming B. procedural programming C. generic programming D. object-oriented programming E. aspect-oriented programming

object-oriented programming

A virtual function is a member function that expects to be ______ in a derived class. A. ignored B. called frequently C. overridden D. private E. None of these

overridden

A class from which the new class is derived is its _____. A. derived class or subclass B. abstract class or interface C. parent class or superclass D. concrete class or subtype E. delegate class or inheritance

parent class or superclass

What key feature of object oriented programming is dynamic dispatch an example of? A. Abstraction B. Closure C. Encapsulation D. Polymorphism

polymorphism

What type of functions must be included in an abstract class in C++? A. Completely defined functions B. Parametric functions C. Pure virtual functions D. Void functions E. Friend functions

pure virtual functions

If a new class is a subclass of a single parent class, then the derivation process is called ______. If a class has more than one parent class, the process is called ________. A. single inheritance, multiple inheritance B. single polymorphism, multiple polymorphism C. single encapsulation, multiple encapsulation D. single abstraction, multiple abstraction E. single type, multiple types

single inheritance, multiple inheritance

For which language the concept of an object is truly universal? A. Ruby B. Python C. Smalltalk D. C# E. C++ F. Java

smalltalk

The integrated use of windows, mouse-pointing devices, and pop-up and pull-down menus, all of which first appeared in ______, dominate contemporary software systems. A. Objective-C B. Smalltalk C. JavaScript D. Python E. C++ F. Java

smalltalk

Which language adopts none of the appearance of the imperative languages and its purity of purpose is reflected in its simple elegance and uniformity of design? A. Objective C B. PHP C. JavaScript D. Smalltalk E. C++ F. Java

smalltalk

______ is essentially typeless, meaning that all code is effectively generic. A. Lisp B. Smalltalk C. Prolog D. C# E. Java

smalltalk

When the compiler binds a member function call with the version of the function that resides in the same class as the call itself, this is considered ______ binding. A. local B. safe C. static D. dynamic E. None of these

static

Unlike Smalltalk and most other languages that support object-oriented programming, a C++ class can also be stand-alone, without a(n) ______. A. superclass B. subclass C. abstract class D. derived class E. interface

superclass

A ______ of a base class expects to be overridden in a derived class. A. constructor function B. destructor function C. static function D. virtual function E. None of these

virtual function

In C++, the storage structure for the list (of dynamically bound methods of a class instance) is often called a ______. A. virtual method table B. stack method table C. method hash table D. virtual linked list E. dynamic method table

virtual method table

In C++, how many constructors are required to be defined explicitly in a class definition? A. Zero B. One C. Three D. Two E. at least one

zero


Set pelajaran terkait

Work and Energy Practice Questions

View Set

Systems of Linear Equations in Three Variables

View Set