We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7
CHAPTER-06: Object Oriented Concepts
1. In Object-oriented methodology, the focus in on which of the following
entities? (A) Data (B) Functions (C) Object (D) All of these 2. Which of the following best suits to Java? (A) A procedural programming language (B) An Object-oriented programming language (C) A Query language (D) All of these 3. Which of the following is used to distinguish objects from each other? (A) Attributes (B) State (C) Behavior (D) All of these 4. Which of the following is used to define common features of similar objects? (A) Class (B) Object (C) Methods (D) All of these Advertisement 5. Which of the following is not a visibility symbol? (A) ~ (B) * (C) # (D) – 6. Which of the following is provided using encapsulation? (A) Data protection (B) Data sharing (C) Separation of data and methods (D) All of these 7. Which of the following is enabled by data abstraction? (A) Data protection (B) Data hiding (C) To hide implementation details of method manipulating the data (D) All of these 8. With which of the following options polymorphism cannot be achieved? (A) Method overloading (B) Operator overloading (C) Data hiding (D) All of these 9. An aggregation model refers to which of the following relationships? (A) ‘is –a’ relationship (B) ‘is – like’ relationship (C) ‘a – part – of’ relationship (D) All of these 10. An inheritance model refers to which of the following relationships? (A) ‘is –a’ relationship (B) ‘has-a’ relationship (C) ‘a – part – of’ relationship (D) All of these 11. In class diagram, composition is represented using which of the following symbols? (A) Empty diamond symbol (B) Filled diamond symbol (C) Empty triangle symbol (D) All of these Exam Oriented MCQs 1. In which year the object-oriented programming concepts was started? a) 1960 b) 1970 c) 1966 d) 1980 2. From the following which are the popular programing language that support object-oriented programing? a) C++, Java b) C#, VB.net c) ASP.net , PHP d) All of these 3. The way of programing can be divided into ……………….. categories. a) structure / procedural b) object-oriented c) Markup language d) both a and b 4. In which programing, the focus is on writing functions or procedures which operate on data? a) Procedural b) Object-oriented c) Markup d) Makeup 5. In which programing, the focus is on objects which containing both data and functionality together? a) Procedural b) Object-oriented c) Markup d) Makeup 6. Which of the programing language enables the programmer to create modular, reusable and expendable code? a) Procedural b) Object-oriented c) Markup d) Makeup 7. Object-Oriented programing uses ………… as its fundamental building block. a) Object b) class c) Row d) Table 8. In the “real” world, which of the following are the entities of which the world is comprised? a) object b) class c) Row d) Table 9. In object-oriented terminology, characteristics are known as ………… a) properties b) attributes c) entity d) both a or b 10. To identify the objects, we use the value of the attributes. These value is called as ………… a) State b) class c) behavior d) object 11. There is always a behavior associated with ………………. a) State b) class c) behavior d) object 12. The behavior also known as ………………. a) State b) class c) behavior d) method 13. Any real world objects can be described in terms of ………………………. a) What it is called (identity) b) What it is (its state [value] ) c) What it does (its behavior) d) All of these 14. can be considered as a blueprint for various objects. a) State b) class c) behavior d) object 15. A …………… is a template for multiple objects with similar features. a) State b) class c) behavior d) object 16. A ………………. also describes a group of objects with similar attributes and common behavior. a) State b) class c) behavior d) object 17. A class is a concept used to embody all the common features of a particular set of ………… a) State b) class c) behavior d) object 18. What presents a collection of classes, constraints and relationship among classes? a) Class diagram b) Object diagram c) Oriented diagram d) Table diagram 19. Which model can be used to create models of object-oriented software to help with design of an application? a) GML b)UML c) HML d) MUL 20. What is a visual modeling language defined and maintained by the OMG ? a) UML b) XML c) GML d) HML 21. What specifies several diagrams for representing different aspects of a software application? a) UML b) XML c) GML d) HML 22.The purpose of the class diagram is to model the ………………. view of an application. a) Static b) dynamic c) Random d) Linear 23.Which diagrams are the only diagrams which can be directly mapped with object- oriented languages? a) class diagrams b) Object diagram c) Oriented diagram d) Table diagram 24. In class diagram, a class is represented with an icon using a rectangle split into how many sections? a) 1 b) 2 c) 3 d) 4 25.In class diagram, a class is represented with an icon using a rectangle in how many sections? a) name b) attributes c) behavior d) All of these 26.The three sections of a class diagram are : Name of the class in the top section Attributes or properties of the class in the middle section Behavior or operations or methods of the class in the bottom section All of these 27.In UML notation, an attribute is declared using following syntax: Ans. [<visibility>] <attribute name> [:<attribute data type>[=<initial value> ] ] 28. In an attribute declaration, the ………………….. brackets are optional. a) square [ ] b) circle ( ) c) angular < > d) Curly { } 29.In an attribute declarations, the value should be specified into……….. brackets. a) square [ ] b) circle ( ) c) angular < > d) Curly { } 30. In an attribute declarations, the visibility can be classified into ………….. a) private b) protected, public c) package d) All of these 31. Which symbol is used for private visibility ? a) # (Hash) b) – (Dash) c) + (Plus) d) ~ (Tilde) 32.Which symbol is used for protected visibility ? a) # (Hash) b) – (Dash) c) + (Plus) d) ~ (Tilde) 33. Which symbol is used for public visibility ? a) # (Hash) b) – (Dash) c) + (Plus) d) ~ (Tilde) 34. Which symbol is used for package visibility ? a) # (Hash) b) – (Dash) c) + (Plus) d) ~ (Tilde) 35.generally refers to a variable. a) class b) Attributes c) state d) behavior 36. is mandatory and all other items are optional in attribute declaration notation. a) class b) Attribute – Name c) state d) behavior 37.In UML notation, an operation is declared using…………………… syntax. Ans. [<visibility>] <method name>(parameter list separated by comma) :<return data type> 38. Which diagrams are independent of the programming language used for coding an application? a) UML diagram b) Class Diagram c) Object Diagram d) None 39.are presented using their state during execution of an application. a) Objects b) class c) Attributes d) State 40. Objects are ……………. a) Dynamic b) Static c) Linear d) Random 41. In object-oriented programming, the problem of modification can be solved using ………….. a) Encapsulation b) Aggregation c) Messaging d) Polymorphism 42. How many core elements are there in computer program? a) data b) element c) Attributes d) Both a and b 43. The mechanism of providing protection to data and methods of a program is called What? a) Encapsulation b) Aggregation c) Messaging d) Polymorphism 44. What is possible by wrapping data and methods into a single unit class and declaring them as private? a) Encapsulation b) Aggregation c) Messaging d) Polymorphism 45. Which members of the class are not available directly to outside world? a)Private b) Protected c) Public d) Package 46. Encapsulation provides ………… hiding capability. a) data b) information c) Table d) All of these 47.keeps the data safe from unintended actions and inadvertent access by outside objects. a) Encapsulation b) Aggregation c) Messaging d) Polymorphism 48. What is a process of representing the essential features of the objects without including implementation detail? a) Encapsulation b) Data abstraction c) Data Messaging d) Polymorphism 49.is a concept that hides the complexity, it says what it does. a) Encapsulation b) Data abstraction c) Data Messaging d) Polymorphism 50. Which technique that relies on the separation of interfaces and implementation which is not a new concept in programming? a) Encapsulation b) Data abstraction c) Data Messaging d) Polymorphism 51. A user defined function with necessary input data parameters also provides …………. a) Encapsulation b) Data abstraction c) Data Messaging d) Polymorphism 52.provides the skeleton or templates for our use. The system hides certain details of how data is stored, created and maintained. a) Encapsulation b) Data abstraction c) Data Messaging d) Polymorphism 53.Which are the examples for data abstraction ? a) ADT or structures (Struct) in C / C++ b) classes in C++/ JAVA c) JavaScript d) Both a and b 54. The basic difference between data encapsulation and data abstraction is : Encapsulation protects data by making them inaccessible form outside and abstraction enables to represent data in which the implementation details are hidden (abstracted). 55.In ……….. , we simply define a data type and a set of operation on it but the implementation of operations is not seen. a) ADT b) UML c) HML d) XML 56. In object-oriented terminology, a call to a method is referred to as a …………….. a) Message b) class c) Attributes d) State 57.Which of the following means ‘many forms’ which may be different forms of single method or operation? a) Encapsulation b) Aggregation c) Messaging d) Polymorphism 58. Object-Oriented programing allows defining more than one method having same name but different signatures (means number and type of parameters) in a single class. This feature is known as ………. a) Method overloading. b) Inheritance c) Data Messaging d) Method Overriding 59.In how many types of overloading is achieved by polymorphism? a) function overloading b) operator overloading c) Inheritance d) Both a and b 60. The capability of using same names to mean different things in different contexts is called what ? a) Method overloading b) Inheritance c) Data Messaging d) Method Overriding 61. When objects of one class are composed of objects of other class, it is called what ? a) aggregation b) composition c) Encapsulation d) Both a or b 62.Aggregation represents ……………….. type of relationship between classes. a) ‘has-a’ b) ‘a-part-of’ c) a-kind-of d) Both a or b 63. Aggregation represents ……………. relationship between two classes. a) non-exclusive b) exclusive c) Strong d) Simple 64. In …………. , the class that forms part of the owner class can exist independently. a) aggregation b) Composition c) Inheritance d) Polymorphism 65. Basic aggregation is represented using an …………. symbol next to the whole class. a) empty diamond b) Filled diamond c) empty circle d) filled circle 66. Composition represents ……………… relationship between two classes. a) non-exclusive b) exclusive c) Strong d) Simple 67.is a strong type of aggregation where the lifetime of the part class depends on the existence of the owner class. a) aggregation b) Composition c) Inheritance d) Polymorphism 68. If an object of aggregating class is ………….. , its part class object also will get deleted. a) deleted b) updated c) appended d) modified 69.Inheritance is generally referred to as …………………….. relationship between two classes. a) is-a-kind-of b) is-a-part-of c) has-a d) like-a 70.refers to the capability of defining a new class of objects that inherits the characteristics of another existing class. a) polymorphism b) Inheritance c) Aggregation d) Composition 71. In Inheritance ( Object-Oriented ) terminology, new class is called ………………… a)sub class b) child class c) derived class d) All of these 72.In Inheritance (Object-oriented) terminology, the existing class is called ………….. a)super class b) parents class c) base class d) All of these 73.In a class diagram, inheritance is represented using an …………….. pointing to superclass. a) arrow b) diamond c) circle d) dash 74.is the another name for inheritance or “is a” relationship. a) Generalization b) Polymorphism c) Aggregation d) Composition 75.refers to a relationship between two classes where one class is a specialized version of another. a) Generalization b) Polymorphism c) Aggregation d) Composition 76.In Inheritance, common attributes and methods are defined in ……………… class in inheritance. a) sub b) Super c) sub, super d) public 77. When class is derived from two or more classes, it is known as …type of inheritances. a) multiple b) single c) multi level d) Both a and b 78.In ……… feature, classes do not inherit from other classes, but are ‘composed of’ other classes. a) Aggregation b) composition c) polymorphism d)Inheritance 79.In class diagram, composition is represented using, which of the following symbols? a) Empty diamond b) Filled diamond c) Empty triangle d) Filled triangle 80. Which of the following is not a visibility symbol? a) # (hash) b) * (star) c) ~ (tilde) d) d (dash) 81. Which of the following is a concept that hides the complexity; it says what it does, but not how it is done? a) Abstraction b) Polymorphism c) Message d) Data 82. Which of the following can be used to create models of object-oriented software to help with design of an application? a) Unified Maseup language b) Unified markup language c) Unified modeling language d) Unified morphing language 83. What is the full form of JVM? a) Java Varity Machine b) Java Vertical Machine c) Java Virtual Machine d) Java Visual Machine 84. In Java, what keeps the data safe from unintended actions and inadvertent access by outside objects? a) Data-abstraction b) Polymorphism c) Encapsulation d) Aggregation 85. In class diagram, a class is represented with an icon using a rectangle is splitted into how many sections? a) 2 b) 3 c) 4 d) 6 86. Aggregation represents which type of relationship between two classes? a) non-exclusive b) exclusive c) same d) None of the above