Вы находитесь на странице: 1из 2

1. A remote control that is used to turn on or off some machine is also called a(n) _____.

A) class B) interface C) message D) instance 2. In a student grading system, Student Last Name, Student Address, and Final Course Grade would all be classified as what? A) Inheritance B) Information C) Encapsulation D) Polymorphism 3. What part of object-oriented technology defines superclass and subclass relationships? A) Inheritance B) Scalability C) Encapsulation D) Polymorphism 4. In a student grading system, objects from different classes communicate with each other. These communications are known as _____. A) inheritance B) polymorphism C) messages D) concealment 5. When an object has many forms, it has _____. A) Inheritance B) Scalability C)

Encapsulation D)

Polymorphism

6. What term is used to describe the internal representation of an object that is hidden from view outside the object's definition? A) Encapsulation B) Expandable C) Polymorphism D) Inheritance 7. What programming language model is organized around "objects" rather than "actions"? A) Java B) OOB C) Perl D) C++ 8. What are the instructions called that tell a system what, how, and when to do something? A) Object-oriented technology approach B) Object-oriented database C) Program D) Database management 9. What common technique attempts to save time and energy by reducing redundant work in objectoriented programming? A) Reduce lines of programming B) Reuse of code C) Reduce size of systems being developed D) Merging different systems together 10. What kind of programming language is Java? A) Object-oriented programming language C) Sixth-generation programming language

B) Relational programming language D) Database management programming language

11. It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id and salary. Employees belong to different categories and their salary is determined by their category. The functions to get Name, getld and compute salary are required. Given the class hierarchy below, possible locations for these functions are: i. ii. iii. iv. v. vi. getld is implemented in the superclass getld is implemented in the subclass getName is an abstract function in the superclass getName is implemented in the superclass getName is implemented in the subclass getSalary is an abstract function in the superclass

vii. viii.

getSalary is implemented in the superclass getSalary is implemented in the subclass

Choose the best design (a) (i), (iv), (vi), (viii) (b) (i), (iv), (vii) (c) (i), (iii), (v), (vi), (viii) (d) (ii), (v), (viii) 12. Which one of the following are essential features of an object-oriented programming language ? (i) Abstraction and encapsulation (ii) Strictly-typedness (iii) Type-safe property coupled with sub-type rule (iv) Polymorphism in the presence of inheritance Choose the correct one: (a) (i) and (ii) only (b) (i) and (iv) only (c) (i), (ii) and (iv) only (d) (i), (iii) and (iv) only Unit 5th Q. Which line will produce error? Class phone: private Transmit, private Receiver { } 1. int main() 2. { 3. phone obj; 4. Tranmit* obj1 = &obj; 5. Received obj2 = &obj; 6. } (a) 3rd line will produce error (b) 4th line will produce error (c) 3rd and 4th line will produce error. (d) 5th line will produce error Q. a) b) c) d) -Q. Function overriding is done in context of, Single class Single derived class Single base class Derived and base classes

Вам также может понравиться