OOPortal OOPortal

Interview Questions  «Prev  Next»

## Object Oriented Programming - Part 1

1. OOD can improve productivity by providing a practical mechansim to reuse classes from one project to another.
1. 2. Objectives of OOD: 1. Increase Productivity 2. Increase Quality 3. Elevate Maintainability 3. For Coad and Yourdon an {\it object oriented approach} consists of 1)classes 2)objects 3) inheritance and 4) communication with messages. 4. Relationships between Objects} 1. Whole - Part Structures 2. Instance conncetions (Association relationships) 3. Message connections 5. Gen-Spec relationships between classes define an inheritance hierarchy for classes that are specializations of other classes. 6. Simple statically-typed objects can be viewed as instances of record types. 7. The record fields are called member data in C++. 8. A member function is equivalent to a function taking an object of the record type called the receiver} as the first parameter. The receiver is called this. 9. When defining member functions for a class you sometimes want to refer to the calling object. The this pointer is a predefined pointer that points to the calling object. 10. A reference} is an alias or synonym for another variable. It is declared by using the reference operator & appended to the reference type.