CS304 Object Oriented Programming Quiz 1 Fall 2013

Dear Students,

Quiz No. 01 of the subject Object Oriented Programming (CS304) is going to upload in a couple of days, before submitting the Quiz, please read all instructions thoroughly.

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

****************************************************************************************

Question # 1 of 10
Information hiding can be achieved through__________.

  1. Encapsulation, Inheritance
  2. Encapsulation, Polymorphism
  3. Encapsulation, Abstraction
  4. Overloading

Question # 2 of 10 ( Start time: 01:11:21 AM ) Total Marks: 1 
A good model is ……………. related to a real life problem.
Select correct option:

  1. Loosely
  2. Openly
  3. Closely

Question # 3 of 10 ( Start time: 01:12:33 AM ) Total Marks: 1 
Which of the following features of OOP is used to derive a class from another? 
Select correct option: 

  1. Encapsulation
  2. Polymorphism
  3. Data hiding
  4. Inheritance

Question # 4 of 10 ( Start time: 01:13:51 AM ) Total Marks: 1 
Which of the following is a weak relationship between two objects? 
Select correct option: 

  1. Inheritance
  2. Composition
  3. Aggregation
  4. None of given

Question # 5 of 10 ( Start time: 01:14:56 AM ) Total Marks: 1 
Data items in a class must be private. 
Select correct option: 

  1. True
  2. False

Question # 6 of 10 ( Start time: 01:15:52 AM ) Total Marks: 1 
Which one is a class association 
Select correct option: 

  1. Simple Association
  2. Inheritance
  3. Composition
  4. Aggregation

Question # 7 of 10 ( Start time: 01:16:55 AM ) Total Marks: 1 
Suppose there is an object of type Person, which of the following can be considered as one of its attributes 
Select correct option: 

  1. Name
  2. Age
  3. Work()
  4. Both Name and Age

Question # 8 of 10 ( Start time: 01:17:52 AM ) Total Marks: 1 
Which one is not an object association?
Select correct option: 

  1. Simple association
  2. Inheritance
  3. Aggregation
  4. Association

Question # 9 of 10 ( Start time: 01:18:50 AM ) Total Marks: 1 
Using encapsulation we can achieve 
Select correct option:

  1. Information hiding
  2. Least interdependencies among modules
  3. Implementation independence
  4. All of given options

Question # 10 of 10 ( Start time: 01:19:43 AM ) Total Marks: 1
In constant member function the type of this pointer is: 
Select correct option:

  1. Constant pointer
  2. Constant pointer to object
  3. Constant pointer to class
  4. Constant pointer to constant object

Question # 1 of 10
Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes? 

  1. Generalization
  2. Sub-typing
  3. Specialization
  4. Extension

Question # 2 of 10
The ability to derive a class from more than one class is called 

  1. Single inheritance
  2. Encapsulation
  3. Multiple inheritance
  4. Polymorphism

Question # 3 of 10:
If MyClass has a destructor what is the destructor named?

  1. MyClass
  2. ~MyClass
  3. My~Class
  4. MyClass~

Question # 4 of 10:
Class abc{ —– }; Is a valid class declaration?

  1. yes
  2. no

Question # 5of 10:
Without using Deep copy constructor, A ____________ problem can occur 

  1. System crash
  2. Memory Leakage
  3. Dangling pointer
  4. All of the given

Question # 6 of 10:
If only one behaviour of a derived class is incompatible with base class, then it is: 

  1. Generalization
  2. Specialization
  3. Extension
  4. Inheritance

Question # 7 of 10:
Which of the following may not be an integral part of an object?

  1. state
  2. behavior
  3. Protected data members
  4. All of given

Question # 8 of 10:
Only tangible things can be chosen as an object.

  1. True
  2. False

 

DOWNLOAD SOLUTION HERE
loading...