Académique Documents
Professionnel Documents
Culture Documents
Explanations:
False free memory False notify the environment of a special event False name objects Correct initialize a new object
A constructor is a special method that is called when an object is first created (i.e. instantiated).
Question no. 9
If Car is a class, then Mercedes most probably is an interface a method an object a class member
Explanations:
False an interface
Question no. 9
Class A has an "is a" relationship with class B. This means class A is superclass of class B
Explanations:
False is superclass of class B Correct is subclass of class B
Question no. 9
Circle inherits Shape. Casting from Shape to Circle is upcasting, checked at runtime upcasting, checked by the compiler downcasting, checked by the compiler downcasting, checked at runtime
Explanations:
False upcasting, checked at runtime False upcasting, checked by the compiler False downcasting, checked by the compiler Correct downcasting, checked at runtime
Question no. 9
Inheritance is a synonym to polymorphism not part of the OOP terminology a recommended practice in enterprise applications meant for reusing the interface of a class
Explanations:
False a synonym to polymorphism
False not part of the OOP terminology False a recommended practice in enterprise applications Correct meant for reusing the interface of a class
Inheritance will make the methods defined in the base class be available for use in the derived class.
Question no. 9
A class consists of member objects member procedures member methods member data
Explanations:
False member objects
Question no. 9
A static data member is a data member that cannot be moved something specific to only one programming language a variable that cannot be modified only one, no matter how many objects are created
Explanations:
False a data member that cannot be moved False something specific to only one programming language False a variable that cannot be modified
When a data member is declared as static, only one copy of the data is maintained for all objects of the class.
Question no. 9
Programming without inheritance is programming with abstract data types is not object oriented can be object oriented allows better polymorphism.
Explanations:
False is programming with abstract data types False is not object oriented Correct can be object oriented
Inheritance is not mandatory, although contributes in a large part to a successful OO implementation. False allows better polymorphism. Polymorphism does not exist without inheritance.
Question no. 9
The "singly rooted hierarchy" means only one object hierarchy can exist all classes are inherited from a single base class each class hierarchy has its own root a "_root" element exists in each class
Explanations:
False only one object hierarchy can exist Correct all classes are inherited from a single base class
Singly rooted hierarchy assumes one class from which the others are derived. False each class hierarchy has its own root
False a "_root" element exists in each class
Question no. 9
Which one of the following terms must relate to "polymorphism" Static allocation Dynamic allocation Static typing Dynamic binding
Explanations:
False Static allocation False Dynamic allocation False Static typing Correct Dynamic binding