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.


Please share your quiz here

Views: 1994

Replies to This Discussion

please  share the online quiz

please any body share quiz of cs 304

i guess no body has attempted it yet

tWO qUIZEZ OF CS304 QUIZ NO 1

Attachments:

thnx imo

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

 

Static member can not be called with the class name.
1-true
false

An object has _____ interface(s)
only one
only two
one or more than one
none of the above

Aggregation is implemented using pointer.

Which of the following is directly related to polymorphism?
Overriding
Const members
Static members
None of given

Class abc{ ----- }; Is a valid class declaration?
yes
no

Without using Deep copy constructor, A __________ problem can occur
System crash
dangling pointer
Memory Leakage

Consider the statement “room has chair” Which of the following type of association exists between room and chair?
Inheritance
There is no association
Aggregation
COMPOSITION

Which of the following parts of an object exhibits its state?

If MyClass has a destructor what is the destructor named?

~MyClass

In constant member function the type of this pointer is:

constant pointer
constant class
constant object
constant pointer to constant object

Public member function exposed by a class is called surface
Select correct option:
True
False
me
false
abeel
false?
me
f
abeel
Through interface we access object_________________.
Select correct option:
States
Data members
Behaviour
Objects communicate each other through ______
Select correct option:
Messages
Data members
Both of above
None of the above
Data items in a class must be private.
Select correct option:
True
False

Information hiding can be achieved through__________.
Select correct option:
Encapsulation, Inheritance
Encapsulation, Polymorphism
Encapsulation, Abstraction
Encapsulation, Overloading
Which one is a class association
Select correct option:
Simple Association
Inheritance
Composition
Aggregation
________ provide the facility to access the data member.
Select correct option:
accesser function
private function
inline function
None of the given
abeel
A good model is ................ related to a real life problem.
Select correct option:
Loosely
Openly
Closely
Not
If MyClass has a destructor what is the destructor named?
Select correct option:
MyClass
~MyClass
My~Class
MyClass~
Behaviors of a type of objects are represented through
Select correct option:
Data
States
Attributes
Operations

here are some question

Attachments:

 Neha thanks for sharing 

cs304 quiz

Question # 1 of 10 ( Start time: 04:31:59 PM ) Total Marks: 1
Three main characteristics of "Object Oriented programming" are,
Select correct option:

Encapsulation,dynamic binding,polymarhpishm
polymorphism, overloading, overriding
encapsulation, inheritance, dynamic binding
encapsulation, inheritance, polymorphism (Correct)
encapsulation (data and methods that act on the data are encapsulated in a "class")
inheritance (you can reuse code that has already been created by something very similar)
polymorphism (using already existing functions to perform new tasks by reusing established code)

Question # 2 of 10 ( Start time: 04:33:29 PM ) Total Marks: 1
Encapsulation means
Select correct option:

Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity (Correct)
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class

Question # 3 of 10 ( Start time: 04:34:53 PM ) Total Marks: 1
Which of the following is an advantage of OOP?
Select correct option:

OOP makes it easy to re-use the code
It provides an ability to create one user defined data type by extending the other
It provides the facility of defining Abstract data types through which real world entities can be defined better
All of the given options (Correct)

Question # 4 of 10 ( Start time: 04:35:59 PM ) Total Marks: 1
We can allocate dynamic memory allocation through___________ key word.
Select correct option:

Static
Global
New (Correct)
Const

Question # 5 of 10 ( Start time: 04:37:31 PM ) Total Marks: 1
In programming, where the actual actions are coded is called:
Select correct option:

Function declaration
Function calling (Correct)
Function definition
None of the given

Question # 6 of 10 ( Start time: 04:38:56 PM ) Total Marks: 1
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 (Correct)
Specialization
Extension

Question # 7 of 10 ( Start time: 04:40:27 PM ) Total Marks: 1
Which of the following is directly related to polymorphism?
Select correct option:

Overriding (Correct)
Const members
Static members
None of given

Question # 8 of 10 ( Start time: 04:41:53 PM ) Total Marks: 1
In a class declaration, data or functions designated private are accessible
Select correct option:

to any function in the program.
only if you know the password.
to member functions of that class. (Correct)
only to public members of the class.

Question # 9 of 10 ( Start time: 04:43:24 PM ) Total Marks: 1
An instance of user defined type is called
Select correct option:

Object (Correct)
Class
both of above
none of above

Question # 10 of 10 ( Start time: 04:44:52 PM ) Total Marks: 1
Aggregation is implemented using pointer.
Select correct option:

True (Correct)
False

1. Data items in a class must be private.
A. TRUE
B. FALSE (Correct)

2. The ______ keyword tells the compiler to substitute the code within the function definition for every instance of a function call
A. virtual
B. inline (Correct)
C. instance
D. none of the given

3. Objects communicate each other through ________
A. Messages (Correct)
B. Data members
C. Both of above
D. None of the above

4. Which one is not the main feature of object oriented programming?
A. Classes and Objects
B. Exception handling (Correct)
C. Inheritance
D. Polymorphism

5. Public member function exposed by a class is called surface
A. TRUE
B. FALSE (Correct)

6. If class A supports all the operations of class B, then class A is:
A. Class A is behaviourally compatible with class B (Correct)
B. Class A is behaviourally incompatible with class B
C. Class A is independent of class B
D. None of the given

7. A fan has wings”. Which type of relation exists between fan and wings in this sentence?
A. Aggregation
B. Association
C. Generalization
D. Composition (Correct)

8. Which is true about sub-typing in case of inheritance?
A. In sub-typing a new class is derived from existing where the derived class shows some extended behavior of its parent. (Correct)
B. In sub-typing a new class is derived from existing which is a restricted form of its parent class.
C. In sub-typing a class is derived from existing one where the derived class should be abstract.
D. None of the given

9. Class is not a mechanism to create objects and define user data types.
A. TRUE
B. FALSE (Correct)

10. Which of the following may not be an integral part of an object?
A. state
B. behavior
C. Protected data members
D. All of given (Correct)

CS304_Online_Quiz#01_Spring_2013

See the attached file plesase 

Attachments:

RSS

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

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