Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS304 QUIZ No1 14 Nov 2012

Views: 885

Replies to This Discussion

1.Using encapsulation we can achieve
Select correct option:

Information hiding
Least interdependencies among modules
Implementation independence
All of given options




2.Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those vustudents.ning common behaviours and attributes?
Select correct option:

Generalization
Sub-typing
Specialization
Extension


Question # 3 of 10 ( Start time: 12:54:44 PM ) Total Marks: 1
Data items in a class must be private.
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
Objects communicate each other through ________
Select correct option:

Messages
Data members
Both of above
None of the above


Zahid: messeges hy yar
Which one is not the main feature of object oriented programming?
Select correct option:

Classes and Objects
Exception handling
Inheritance
Polymorphism
Public member function exposed by a class is called surface
Select correct option:

True
False


If class A supports all the operations of class B, then class A is:
Select correct option:

Class A is behaviourally compatible with class B
Class A is behaviourally incompatible with class B
Class A is independent of class B

None of the given
Sent at 12:58 PM on Monday
A fan has wings”. Which type of relation exists between fan and wings in this sentence?
Select correct option:

Aggregation
Association
Generalization
Composition


Which is true about sub-typing in case of inheritance?
Select correct option:

In sub-typing a new class is derived from existing where the derived class shows some
extended behavior of its parent.

In sub-typing a new class is derived from existing which is a restricted form of its parent class.
In sub-typing a class is derived from existing one where the derived class should be abstract.
An object has only one interface



Read more: Today quiz - Virtual University of Pakistan http://vustudents.ning.com/group/cs304objectorientedprogramming/for...

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

 

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service