Object-Oriented Programming Concepts Quiz
Object-Oriented Programming Concepts Quiz
Total Marks: 8
(1). 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 the above
(2). Which of the following is used to define common features of similar objects?
(A) Class (B) Object (C) Methods (D) All of the above
(3). Which of the following is provided using encapsulation?
(A) Data protection (B) Data sharing
(C) Separation of data and methods (D) All of these
(4). With which of the following options polymorphism cannot be achieved?
(A) Method overloading (B) Operator overloading
(C) Data hiding (D) All of these
(5). 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
(6). Show the era in which rapid applications development and reusability of source code is very important.
(A) Internet (B) Website (C) Web based operations (D) All of these
(7). Which of the following methodologies is proclaimed to be more reliable for developping software?
(A) Procedural Programming (B) Object-oriented Programming
(C) Web Programming (D) All of these
(8). Which of the following year's mid Object-oriented programming become the main programming paradigm
used in creation of new software?
(A) 1980 (B) 1970 (C) 1960 (D) 1950
(9). Which of the following programming languages support object-oriented programming?
(A) C++, Java (B) [Link], [Link] (C) C #, PHP (D) All of these
(10). In which of the following programming is our focus levelled on writing functions or procedures which
operate on data?
(A) Procedural (B) Object (C) Web (D) Animation
(11). Which module is mainly focussed in procedural programming for library application?
(A) Student registration (B) Book issue (C) Book return, Fine calculation (D) All of these
(12). Which of the following objects can we think for Library application created using object-oriented
programming?
(A) Student (B) Book (C) Librarian (D) All of these
(13). Which kind of code does the power of object- oriented programming language enable the programmer to
create?
(A) Modular (B) Reusable (C) extendable (D) All of these
(14). What does object-oriented programming use as its fundamental building blocks?
(A) Class (B) Object (C) Method (D) Programmer
(15). How many object properties does an object has?
(A) Three (B) Five (C) Four (D) Two
(16). If any computer language supports four specific object properties called abstraction, encapsulation,
polymorphism and inheritance then what is this language called?
(A) Procedural (B) Object-oriented (C) Structured (D) None of these
(17). State the form in which the object is there.
Chahwala Sir - 9925004189 PAGE NO: 56
(A) Physical (B) Abstract (C) A and B both (D) None of these
(18). Which of the following objects are available physically?
(A) Person, Car or coffee cup (B) Date and Time concept
(C) A and B both (D) None of these
(19). Which type of identity do all objects have?
(A) One (B) Unique
(C) Started with same number (D) Started with same symbols
(20). What is known as the value of attributes which we use to identify the object?
(A) Property (B) State (C) Caption (D) Validation
(21). Behaviour is known as the following one.
(A) Caption (B) Alias (C) Method (D) Design
(22). In which of the following terms can objects be described in “real” world?
(A) Identity (B) State (C) Behaviour (D) All of these
(23). The data attributes and behavioural methods associated with an object are referred as following.
(A) Member (B) Feature (C) (A) or (B) (D) None of these
(24). Which concept does object-oriented system use?
(A) State (B) Class (C) Property (D) Attribute
(25). Which of the following is a template for multiple objects with similar features?
(A) Class (B) State (C) Field (D) Method
(26). Which type of group of objects a class is?
(A) With similar attributes and common behaviour
(B) With different attributes
(C) With different behaviour
(D) None of these
(27). What is going to be considered for each individual, if we have a class named 'Person' describing common
attributes and behaviour of all persons?
(A) Object (B) State (C) Behaviour (D) Property
(28). Which of the following represents a collection of classes, constraints and relationship among classes?
(A) Object-diagram (B) Memory-diagram (C) Class-diagram (D) Field-diagram
(29). What is the full form of UML?
(A) Unicode Mixer Language (B) Unicode Main Language
(C) Unified Modelling Language (D) Unified Main Language
(30). What can be used to create models of object- oriented software?
(A) XML (B) OMG (C) UML (D) DHTML
(31). Which of the following languages is a visual modelling language?
(A) UML (B) HTML (C) XML (D) DHTML
(32). What is the full form of OMG?
(A) Object Management Group (B) Object Master Group
(C) Onscreen Management Group (D) Open Management Group
(33). Which of the following software specifies several diagrams for representing different aspects of a software
application?
(A) URI (B) URL (C) UML (D) ULM
(34). What is class-diagram?
(A) Diagrams (B) Steps (C) Symbols (D) (B) and (C) both
(35). In how many sections is a rectangle which is used to represent a class split?
(A) Five (B) Four (C) Three (D) Two
(36). Which of the following bracketted items are optional in UML notation?
Chahwala Sir - 9925004189 PAGE NO: 57
(A) <> (B) [] (C) () (D) {}
(37). Which type of visibility can be there in syntax of UML notation?
(A) Private (B) Protected (C) Public Or Package (D) All of these
(38). Which item is mandatory and all other items are optional in syntax of attribute?
(A) Data type (B) Initial value (C) Attribute name (D) A and B both
(39). Which of the following syntax is used to declare a variable Gender with initial value 'M'?
(A) Gender : String = ‘M’ (B) Gender : Char = ‘M’
(C) Gender Char = ‘M’ (D) Gender: Char as = TVT
(40). UML diagrams are not dependent on the following.
(A) on the Programming language used for coding an application
(B) on how many attributes to be used
(C) on how many classes to be used
(D) None of these
(41). How are the objects?
(A) Static (B) Dynamic (C) (A)or(B) (D) None of these
(42). Which are two elements of any computer program?
(A) Data (B) Functions (C) A and B both (D) None of these
(43). As how many entities does object-oriented programming view to data and functions?
(A) Two (B) Three (C) One (D) Many
(44). By which of the following a problem of modification of data can be solved in object- oriented programming?
(A) Encapsulation (B) Data-Abstraction
(C) Polymorphism (D) Inheritance
(45). What type of encapsulation is possible by wrapping data and methods into a class?
(A) public (B) protected (C) private (D) multi
(46). “Private members of the class are not available directly to outside world” - Specify this statement.
(A) This statement is true. (B) This statement is false.
(C) It depends on class. (D) It depends on data.
(47). Which of the following keeps the data safe from unintended actions and inadvertent access by outside objects?
(A) Abstraction (B) Encapsulation (C) Polymorphism (D) Aggregation
(48). Which of the following programming techniques is an opposite kind of technique than the procedural
programming?
(A) script (B) object (C) web (D) animation
(49). Which of the following is a process of representing the essential features of the objects without including
implementation details?
(A) Polymorphism (B) Encapsulation (C) Data-Abstraction (D) Messaging
(50). By which of the following functions data-abstraction concept can be understood in C programming?
(A) sqrt(25) (B) printf("Hello") (C) A and B both (D) None of these
(51). What does data-abstraction provide us to use?
(A) Skeleton (B) Template (C) A and B both (D) None of these
(52). Which of the following is hidden in data- abstraction?
(A) Abstract behaviour of the data type
(B) Details of how the behaviour of the data type is implemented
(C) A and B both
(D) None of these
(53). In which of the following do we simply define a data type and a set of operations on it?
(A) OMG (B) DTA (C) ADT (D) OOP
(54). Which of the following protects data by making them inaccessible from outside?
Chahwala Sir - 9925004189 PAGE NO: 58
(A) Encapsulation (B) Abstraction (C) Messaging (D) Polymorphism
(55). What is referred as a call to a method in object- oriented terminology?
(A) Polymorphism (B) Abstraction (C) Encapsulation (D) Message
(56). “Different classes may have same methods with same name.” Specify this statement.
(A) This statement is true. (B) This statement is false.
(C) It depends on class. (D) It depends on method.
(57). What is called as different forms of single method or operation?
(A) Encapsulation (B) Data-Abstraction (C) Polymorphism (D) Messaging
(58). “Is it possible to define more than one function with same name in object oriented programming.” –
Which of the following is a true answer of this question?
(A) It is possible as long as the methods differ in signatures.
(B) It is possible when signature is not defined.
(C) A and B both
(D) None of these
(59). What does signature mean?
(A) Number of parameters (B) Type of parameter
(C) A and B both (D) None of these
(60). Object-oriented programming allows to define more than one method having same name but different
signatures in a single [Link] is known as this characteristic?
(A) Function (B) Method overloading (C) (A) Or (B) (D) None of these
(61). In object-oriented programming same operation is given different meanings depending upon the data type
of operands used. By what can this type of Polymorphism be achieved?
(A) Aggregation (B) Operator overloading (C) Data-Abstraction (D) Encapsulation
(62). What is called the capability of using same names to mean different things in different context in general?
(A) Overloading (B) Aggregation (C) Composition (D) Encapsulation
(63). Which relationship does aggregation or composition represent between different classes?
(A) has-a (B) a-part-of (C) (A) or (B) (D) None of these
(64). Which attributes will a class contain when we define a class 'computer'?
(A) Motherboard (B) Screen (C) A and B both (D) None of these
(65). Which of the following represents exclusive relationship between two classes?
(A) Aggregation (B) Polymorphism (C) Encapsulation (D) Composition
(66). With which symbol is aggregation represented in class-diagram?
(A) Symbol of an empty diamond (B) Symbol of a filled diamond
(C) Symbol of an empty triangle (D) Symbol of a filled diamond
(67). What is known as the class when it is contained in owner class?
(A) Subject Class (B) Part Class (C) Aggregated Class (D) All of these
(68). Which class is an example of aggregated class when Person class has Name and Address class?
(A) Person (B) Address (C) Name (D) (B) & (C) both
(69). What is called an existing class in object-oriented terminology?
(A) Super class (B) Parent class (C) Base class (D) All of these
(70). Which feature provides reusability where existing methods can be reused without redefining?
(A) Aggregation (B) Inheritance (C) Composition (D) Encapsulation
(71). By using arrow pointing to which class in class- diagram is inheritance represented?
(A) Super (B) Sub (C) Child (D) Derived
(72). Which relationship refers between two classes where one class is a specialized version of another class?
(A) Polymorphism (B) Inheritance (C) Abstraction (D) Encapsulation
(73). Which of the following class is a specialized version with additional attributes and methods?
Chahwala Sir - 9925004189 PAGE NO: 59
(A) Super (B) Base (C) A and B both (D) Sub
(74). Which of the following is an example of multilevel inheritance?
(A) Person <— Employee <— Teacher (B) Computer <— Mother board <— Model
(C) A and B both (D) None of these
(75). Which type of relationship exists between superclass and subclass in inheritance?
(A) ‘a kind of’ (B) ‘multi kind of’ (C) ‘different kind of’ (D) None of these
(76). In which of the following classes do not inherit from other classes, but are composed of other classes?
(A) Inheritance (B) Aggregation (C) Polymorphism (D) Composition
(77). What is represented using class-diagram?
(A) Relationship (B) Constraints (C) A and B both (D) None of these
(78). On which of the following two does focus lie in object-oriented programming?
(A) Data and Animation (B) Networking and Animation
(C) Data and functionality (D) Animation and Functionality
(79). Which of the following together can a class encapsulate as a template that can be shared by all objects?
(A) Attribute (B) Method (C) A and B both (D) None of these
(80). What is a relationship called when there is 'has- a' or 'a-part-of' relationship between two classes?
(A) Aggregation (B) Composition (C) (A) or (B) (D) Polymorphism
(81). Which of the following represents exclusive relationship between two classes?
(A) Aggregation (B) Composition (C) Encapsulation (D) Polymorphism
(82). Which type of features are implemented in subclass in inheritance?
(A) Common (B) Special (C) A and B both (D) None of these
(83). In Object-oriented methodology, the focus is on which of the following entities?
(A) Data (B) Functions (C) Objects (D) All of the above
(84). Which of the following is used to distinguish objects from each other?
(A) Attributes (B) State (C) Behaviour (D) All of the above
(85). Which of the following is not a visibility symbol?
(A) ~ (B) * (C) # (D) -
(86). 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
(87). An aggregation model refers to which of the following relationships?
(A) ‘Has-a’relationship (B) ‘is-not-a’relationship
(C) ‘a-part-of’relationship (D) All of these
(88). 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
(89). Which of the following plays significant role in analysis, design and impementation of software system?
(A) Object-oriented techniques (B) Methodology
(C) (A) or (B) (D) None of these
(90). When did Object-oriented programming start?
(A) 1980 (B) 1970 (C) 1960 (D) 1950
(91). For which of the following purposes object- oriented technology was developed?
(A) To handle the rapidly increasing size and complexity of software systems
(B) To make it easier to modify these large and complex systems over time.
(C) (A) and (B) both
Chahwala Sir - 9925004189 PAGE NO: 60
(D) None of these
(92). In which of the following categories can the programming be divided?
(A) Structure / Procedural Programming (B) Object-oriented Programming
(C) (A) and (B) both (D) None of these
(93). Where do we focus while writing the following for procedural programming?
(A) Functions (B) Procedures (C) A and B both (D) None of these
(94). Which of the following does object contain in object-oriented programming?
(A) Data and Distribution (B) Data and Functionality
(C) Link and Distribution (D) None of these
(95). What should we need to think with the objects in object-oriented programming language?
(A) Association between objects (B) About maximum objects
(C) About minimum objects (D) None of these
(96). What is gained by being able to change or replace modules without disturbing other parts of code?
(A) Variability (B) Selection (C) Flexibility (D) Attraction
(97). Which of the following concepts is used to classify similar objects?
(A) Class (B) Method (C) Property (D) Attribute
(98). Which properties is the object provided by object- oriented language?
(A) Abstraction (B) Encapsulation
(C) Polymorphism and Inheritance (D) All of these
(99). In the “real” world, which of the following is the entity the world is comprised of?
(A) Class (B) Property (C) Attribute (D) Object
(100). What does ‘abstract’ mean?
(A) It cannot be touched (B) It cannot be seen
(C) A and B both (D) None of these
(101). Which of the following objects may be in abstract form?
(A) Person, Car (B) Date and Time concept (C) A and B both (D) None of these
(102). What are the characteristics known as by which objects can be distinguished by each other?
(A) Property (B) Attribute (C) (A) or (B) (D) None of these
(103). An object is associated with the following one.
(A) Behaviour (B) Template (C) Network (D) Web
(104). By what can the following values of objects be changed?
(A) Behaviour (B) Connection (C) Mount (D) Design
(105). What are the attributes referred which describe the object in object-oriented programming?
(A) Data field (B) Property (C) Caption (D) ID
(106). By what do objects differ from each other when they possess same characteristics and behaviour?
(A) State (B) Sub sections (C) Internal sections (D) None of these
(107). For which can class be considered as a blueprint?
(A) for various values of state (B) for various objects
(C) for only one object (D) None of these
(108). With which kind features a class is a template for multiple objects?
(A) Different (B) Similar (C) Same-Five (D) Same-Two
(109). Which kind of semantic purpose objects in the same class has?
(A) Different (B) Same (C) Improper (D) Irrespective
(110). By what is each object identified?
(A) Symbol (B) State (C) ID (D) None of these
(111). What does class-diagram represent?
(A) A collection of classes (B) Constraints
Chahwala Sir - 9925004189 PAGE NO: 61
(C) Relationship among classes (D) All of these
(112). What can be used to create models of object- oriented software?
(A) XML (B) HTML (C) UML (D) DHTML
(113). What is helpful to design an application?
(A) Models of software (B) Founder of the software
(C) Developer of software (D) None of these
(114). By which of the following Unified Modelling Language (UML) is defined?
(A) OMG (B) OML (C) LMO (D) GOM
(115). Which kind of language UML is?
(A) Web designing language (B) Web developing language
(C) Visual modeling language (D) Animation language
(116). Which of the following has the purpose to model the static view of an application?
(A) Cryptography (B) Compressed-diagram
(C) Class-diagram (D) Data-diagram
(117). With which icon a class is represented in class- diagram?
(A) Square (B) Parallelogram (C) Rectangle (D) Round
(118). In which sections is a rectangle which is used to represent a class split?
(A) Name (B) Attribute (C) Behavior (D) All to these
(119). In which brackets in UML notation is the user supposed to specify the values for items enclosed?
(A) <> (B) [] (C) () (D) {}
(120). What does attribute refer to generally?
(A) Data type (B) variable (C) Value (D) Constant
(121). Which of the following syntax is true to declare a variable balance as private and with initial value 0.0?
(A) + Balance: Float = 0.0 (B) ~ Balance: Float=0.0
(C) - Balance : Float = 0.0 (D) # Balance : = 0.0
(122). What can be specified depending on whether parameter is read only or not?
(A) Input (B) Output (C) (A) or (B) (D) None of these
(123). With what are objects represented during execution of an application?
(A) state (B) symbol (C) code (D) None of these
(124). As which of the following are class objects also known as?
(A) Instance (B) Method (C) Behaviour (D) None of these
(125). In which of the following programming are data and functions separate entities?
(A) Object-oriented (B) Structured (C) Animation (D) Web based
(126). In which of the following programming data can be altered by any component of the program?
(A) Object (B) Procedural (C) Animation (D) Web
(127). Which mechanism provides protection to data and methods of a program?
(A) Encapsulation (B) Data-Abstraction (C) Polymorphism (D) Inheritance
(128). What is known as the wrapping of data and methods into a single unit?
(A) Class (B) Object (C) Field (D) Encapsulation
(129). Which method is used to make data available to the outside world?
(A) private (B) public (C) multi (D) single
(130). In procedural programming which type of data areas are often used for sharing information?
(A) private (B) common (C) single (D) multi
(131). Which of the following statements is true for object-oriented programming?
(A) Only the object that “owns” the data can change its content.
(B) Other objects can view it.
(C) Other objects can change this data by sending message to the “owner”.
Chahwala Sir - 9925004189 PAGE NO: 62
(D) All of these
(132). Which of the following is a concept that hides the complexity?
(A) Polymorphism (B) Encapsulation (C) Data-Abstraction (D) Messaging
(133). What does a user defined function with necessary input data parameters provide?
(A) Polymorphism (B) Encapsulation (C) Data-Abstraction (D) Class
(134). What does data-abstraction maintain visible?
(A) Abstract behaviour of the data type
(B) Details of how the behaviour of the data type is implemented
(C) A and B both
(D) None of these
(135). Which of the following is an example of data- abstraction?
(A) Abstract Data Types or structures in C/C++ (B) Classes in C++/Java
(C) A and B both (D) None of these
(136). What is the full form of ADT?
(A) Abstract Data Types (B) Abstract Date Types
(C) Advanced Data Types (D) Abstract Dynamic Types
(137). Which of the following enables to represent data in which the implementation details are hidden?
(A) Encapsulation (B) Abstraction (C) Messaging (D) Polymorphism
(138). Due to which of the following all method calls are handled by objects that recognize the method?
(A) Polymorphism (B) Abstraction (C) Encapsulation (D) Message
(139). What does polymorphism mean?
(A) Many forms (B) different forms (C) (A) Or (B) (D) None of these
(140). “Is it possible to define more than one function with same name in some programming languages.”
Which of the following is a true answer of this question?
(A) Yes (B) No (C) It depends on OS (D) It depends on user
(141). Which type of functions can be defined more than one time with same name in object oriented
programming?
(A) Methods same in signatures. (B) Methods differ in signatures.
(C) A and B both (D) None of these
(142). We have written a function named 'Max' that takes two integers as parameters and returns maximum as
integer value and one more function named 'Max' that finds maximum of integer elements stored in an
array. What is known as this creation?
(A) Encapsulation (B) Polymorphism (C) A and B both (D) None of these
(143). Which of the following object-oriented programming allows writing expression using operators?
(A) Object (B) Class (C) Function (D) Template
(144). By which of the following overloading is polymorphism possible?
(A) Function overloading (B) Operator overloading
(C) A and B both (D) one of these
(145). What is called when objects of one class are composed of other class?
(A) Aggregation (B) Composition (C) (A) or (B) (D) Overloading
(146). A computer screen is a class with following attribute?
(A) length (B) width (C) model (D) All of these
(147). Which of the following represents non-exclusive relationship between two classes?
(A) Aggregation (B) Polymorphism (C) Encapsulation (D) Abstraction
(148). How much is the object class affected when an object of aggregation class is deleted in composition?
(A) It will not be deleted. (B) It will be deleted.(C) It depends on object. (D) It depends on class.
(149). What is known as the class when it contains object of other class?
Chahwala Sir - 9925004189 PAGE NO: 63
(A) Owner Class (B) Whole Class (C) Aggregating Class (D) All of these
(150). Which class is an example of aggregating class when Person class has Name and Address class?
(A) Person (B) Address (C) Name (D) All of these
(151). Which of the following is referred to as 'is-a- kind-of' relationship between two classes?
(A) Aggregation (B) Inheritance (C) Composition (D) Encapsulation
(152). Which relationship is appropriate when one class is a kind of other class?
(A) ‘is - a - kind - of ’ (B) ‘multi - kind - of ’ (C) ‘multi level - kind - of’ (D) None of these
(153). What is called a new class in object-oriented terminology?
(A) Subclass (B) Child class (C) Derived class (D) All of these
(154). Choose the data attributes and methods of the class that are available to objects in the subclass without
rewriting their declaration.
(A) Super (B) Sub (C) Child (D) Derived
(155). What can be done in sub class?
(A) New data can be added. (B) New members can be added.(C) A and B both (D) None of these
(156). “Inheritance allows the methods to be redefined in subclass as per need.” Specify this statement.
(A) This statement is true. (B) This statement is false.
(C) It depends on object. (D) It depends on class.
(157). By using which type of pointing to superclass in class-diagram is inheritance represented?
(A) Line (B) Arrow (C) An empty diamond (D) A filled diamond
(158). Which of the following is a class-diagram if teacher class is created in Person class?
(A) Person —> Teacher (B) Person <— Teacher (C) Person <> Teacher (D) Person <> Teacher
(159). In which of the following class are common attributes and methods defined?
(A) Sub (B) Child (C) A and B both (D) Super
(160). When one class is derived from second class and second class is derived from third class; State what it is
known as.........
(A) Level inheritance (B) Multilevel inheritance (C) Inner inheritance (D) Nested inheritance
(161). In which classes does ' a-kind-of' relationship exist in inheritance?
(A) Masterclass and Superclass (B) Masterclass and Subclass
(C) Superclass and Subclass (D) Subclass and Subclass
(162). Which of the following statements is true for inheritance?
(A) Allows to share functionality of class (B) Allows to reuse functionality of class
(C) Extend functionality (D) All of these
(163). By which of the following is class made in composition?
(A) By other class (B) Inherited (C) (A) or (B) (D) None of these
(164). In which of the following does object-oriented methodology play significant role?
(A) Analysis of software system (B) Design
(C) Implementation (D) All of these
(165). Which of the following encapsulates attributes (data) and methods (behaviour or functionality) together as a
template that can be shared by all objects?
(A) Class (B) Inheritance (C) Super object (D) Sub object
(166). Which of the following are distinguished by their state?
(A) Class (B) Object (C) Data (D) Field
(167). Which of the following represents non-exclusive relationship between two classes?
(A) Aggregation (B) Composition (C) Encapsulation (D) Polymorphism
(168). Which type of features are implemented in superclass in inheritance?
(A) Common (B) Special (C) A and B both (D) None of these