JUNE 1997

Question Paper of CS-16 – Object-Oriented Systems of June 1997 from IGNOU

Note : Question one is compulsory. Answer any three from the rest.

(a) Design a linked list base class. Implement all its possible methods and data structures. Through inheritance mechanism create two more subclasses namely stack and queue class. Implement its data structures and important methods.
Observe the following while designing classes:
� Clearly indicate public and private class
� Use pointers to implement classes
� Design constructors in each class and explain its purpose
� Identify data structures and methods which can be inherited
� Implementation should be in C++

(b) Use the above example to illustrate the main advantages offered as compared to conventional data type.

(c) Generalize your definition of stack to define it as a template class.

(d) Print out which statements in the following C++ code fragment violate the access control mechanism for
class X or class Y class X { private : int i; void pvt_X(); protected : int j; void prot_X(); public : int K; void pub_X(int, int); }; class Y : public X { char C; }; X x; Y y; x.i=10; x.K=15; y.prot_X(); y.pub_X(5, 10); };

2. (a) Describe the following concepts through examples:
(i) Generalization
(ii) Aggregation
(iii) Multiple inheritance
(iv) Metadata

(b) Prepare an object diagram for a graphical document editor that supports grouping which is a concept used in a variety of graphical editors. Assume that a document is composed of several sheets, each sheet contains drawing objects, including text, geometrical objects and graphs. A group must contain at least two drawing objects which can be a direct member of at most one group. Geometrical objects include circle, ellipse, rectangle, line and square.

3. (a) Explain the notion of in line and friend functions in C++ through example.

(b) In C++ what happens if a constructor or destructor assigns a value to the pointer this ? Explain what precautions must be taken when writing such a constructor to ensure that it can correctly initialize both free store and automatic objects.

(c) What is object identity? How is it supported in Smalltalk?

4. (a) C++ supports virtual destructor but not virtual instructors. Give an example to show the use of virtual destructor. Justify the absence of virtual constructors in C++.

(b) Why is the overhead associated with method dispatch (or action calls) in Smalltalk higher than C++?

(c) Give an example to explain the notion of virtual base class in C++. Illustrate what happens to your example when the base class is not declared as virtual ?

5. (a) Comment on the importance of data persistence. What are different approaches to providing persistent data services?

(b) Discuss important features of OODBMS( Object Oriented DBMS).

(c) Discuss the feature of parameterized class, assertion, constraints and garbage collection in Smalltalk, Clos and Eiffel object-oriented programming languages.

6. (a) Apply Booch’s methodology for Object Oriented Analysis and Design specification of Sales Office Automation.

(b) Discuss features of Shlaer and Mellor OOA and OOD method

Comments are closed.