JUNE 2002

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

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

1.(a) Define the following terms with examples:
(i) Exception Handling
(ii) Derived Classes
(iii) Header Files
(iv) Data Abstraction

(b) Design a Singly Linked List Class. The class should include all functionalities relating to a Singly Linked List like Creation, Insertion, Deletion, Printing of elements etc. Observe the following while designing classes :

� Clearly indicate Public and private elements.
� Design Constructors and explain their purpose.
� Identify data structures and methods which can be inherited.
� Implementation should be in C++.

2. (a) Prepare object diagrams showing at least 5 relationships among the following object classes. Include associations, aggregations and generalizations. Use qualified association and show multiplicity balls in your diagrams. You do not need to show attributes or operations. Use association names wherever needed. As you prepare diagrams, you may add additional object classes. File System, File, Directory, File name, ASCII file, executable file, directory file, disk, drive, track, sector.

(b) Compare Procedural Programming with Object Oriented Programming. For what type of applications is the Procedural Programming suitable and for what type of applications is the OOP suitable? Justify your answer.

3. (a) Write code, including class declarations and methods, to implement One-to-Many association which is traversed in the direction from One-to-Many. The association is considered unordered. Use any Object Oriented Programming Language.

(b) Using the quadratic formula as a starting point, prepare a data flow diagram for computing the roots of the quadratic equation ax2 + bx +c =0. Real numbers a, b and c are inputs. Outputs are values of x = R1 and x = R2, which satisfy the equation. Remember, R1 and R2 may be real or complex, depending on the values of a, b and c. The quadratic formula for R1 and R2 is

4. (a) Rephrase the following requirements to make them more precise. Remove any design decisions posing as requirements :

The input to a system is a sample document. The output is random text that mimics the input text by imitating the frequencies of combinations of letters of the input. The user specifies the order of the imitation and the length of the desired output. For order N, every output sequence of N characters is found in the input and at approximately the same frequency.

As the order increases, the style of the output more closely matches the input. The system should generate its output with the following method : Select a position at random in the document being imitated. Scan forward in the input text until a sequence of characters is found that exactly matches the last N – 1 characters of the output. If you reach the end of the input, continue scanning from the beginning. When a match is found, copy the letter that follows the matched sequence from the input to the output. Repeat until the desired amount of text is generated.

(b) Prepare a class diagram from the instance diagram shown in the following figure :

Figure : Instance Diagram for part of your Family Tree Make assumptions, wherever needed.

5. In an Airline Reservation System, there could be a ternary relationship between flight, seat and passenger. What are the candidate keys of the relationship under the following conditions?

(i) A given seat on a given flight is assigned to Zero or One passenger. A passenger may travel on many flights but must have exactly one seat on a traveled flight and must be sitting in it during the flight.

(ii) A given seat on a given flight is assigned to Zero or One passenger, as in the previous. A passenger may travel on many flights and may have several seats on a traveled flight, as long as the extra seats are paid for. (Some passengers may be willing to pay for the extra elbow room, or may have some delicate electronic equipment that they want to strap into a seat)

6. What is Jackson Structured Development? Compare it with OMT (Object Modeling Technique)

Comments are closed.