CS304 1st Quiz Spring 2013 File 3

No Comments

If a class A inherits from class B, then class A is called.
Select correct option:
Child class
Derived class
Parent class
Child and derived class

Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes?
Select correct option:
Generalization
Sub-typing
Specialization

Smile Chat: Which of the following may not be an integral part of an object?
Select correct option:
State
Behavior
Protected data members

Smile Chat: Data items in a class must be private.
Select correct option:
True
False

The process of hiding unwanted details from users is called __________.
Select correct option:
Protection
Encapsulation
Argumentation
Abstraction

How the information hidden within an object can be accessed?
Select correct option:
Through its interface
Through its private data members
Through its private member functions

Single method having different forms is called
Select correct option:
Data hiding
Inheritance
Encapsulation
polymorphism

A good model is ................ related to a real life problem.
Select correct option:
Loosely
Openly
Closely

In programming, where the actual actions are coded is called:
Select correct option:
Function declaration
Function calling
Function definition

Smile Chat: There is no need of “is a” or “is a kind of” relationship in Generalization.
Select correct option:
True
false

Which of the following is an integral part of object?
Select correct option:
State
Behavior
Unique identity
All of given

Public member function exposed by a class is called surface
Select correct option:
True
False

The ______ keyword tells the compiler to substitute the code within the function definition for every instance of a function call
Select correct option:
virtual
inline
instance
none of the given

Which of the following are benefits of encapsulation?
Select correct option:
All variables can be manipulated as Objects instead of primitives
by making all variables protected they are protected from accidental corruption
The implementation of a class can be changed without breaking code that uses it
Making all methods protected prevents accidental corruption of data

“A fan has wings”. Which type of relation exists between fan and wings in this sentence?
Select correct option:
Aggregation
Association
Generalization
Composition

An instance of user defined type is called
Select correct option:
Object
Class
both of above
none of above

 Overriding concept is used in:
Select correct option:
Encapsulation
Polymorphism
Information hiding
None of the given

If we have an overloaded constructor in our class, then compiler construct the default constructor.
Select correct option:
True
False

Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment