0% found this document useful (0 votes)
37 views

Object Oriented Systems and C++4

This 3-page document appears to be an exam for an Object Oriented Programming and C++ course. It contains 5 questions, with multiple parts to each question. Question 1 has parts a-f asking about inline functions, references vs pointers, general functions, function overloading, virtual functions, and I/O streams. Question 2 asks to write programs involving date comparison, area calculation, and time calculation using classes. Question 3 involves drawing object diagrams for file systems and dining philosophers. Question 4 asks for state diagrams, including for an automatic washing machine. Question 5 involves drawing data flow diagrams and explaining their components.

Uploaded by

Ayush Garg
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Object Oriented Systems and C++4

This 3-page document appears to be an exam for an Object Oriented Programming and C++ course. It contains 5 questions, with multiple parts to each question. Question 1 has parts a-f asking about inline functions, references vs pointers, general functions, function overloading, virtual functions, and I/O streams. Question 2 asks to write programs involving date comparison, area calculation, and time calculation using classes. Question 3 involves drawing object diagrams for file systems and dining philosophers. Question 4 asks for state diagrams, including for an automatic washing machine. Question 5 involves drawing data flow diagrams and explaining their components.

Uploaded by

Ayush Garg
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

4-

Printed Pages - 3
I I I I I I

MCA
I I I

- 233
I

(Following Paper ID and Roll No. to be filled in your Answer Book)

Roll No.

MCA THIRD SEMESTER'EXAMINATION,2004-2QO5


/

OBJECT ORIENTED PROGRAMMING

AND C++
Total Marks: 100

'-"Time:
Note:

3 Hours A ttempt ALL the questions.

1.

I
0 C) ~

Attempt any four parts of the follo:ving :(a) (b) (c) (d) .what are inline functions? Explain example. .

(5x4=20) with

What is reference? How it is similar and/or different to Pointers? What are general functions in C++. rules for overloading

<:x>--' c:n
(e) (f)

What are virtual functions? Explain how runtime polymorphism can be achieved using them? What is 'this' operator? use? Explain Classes. the hierarchy Explain its distinct for C++ STREAM

MCA-233

[Turn Over

2.

-'
.

AtteJ)lpt any two of the following: (a)

(10x2=20)

Overload '<I operator to find out whether a given date is less than or' not with respect to another given date. Write a program' AREA' in C++, which calculates area of a circle, square, rectangle, triangle depending upon user's choice. Use function overloading. Write a program in C++, which-asks for 'system-in' and' system-out' time from user and calculates 'system-use-time'. Use classes and

(b)

(c)

,...

objects.
3. (a)

;,
~

Attempt any two of the following: -

(10x2=20)

A directory file contains iMormation about files in a directory, including both ordinary files as well as directory files. Prepare an object diagraJ)l which models directory files and ordinary files.

(b)

..

Prepare an object diagram for the DiningPhilosopher's Problem. There are 5 Philosophers and 5 forks around a circular table. Each philosopher has access to two forks on either on the. table or in use by' one philosopher. A philosopher must have 2 forks to eat. Prepare a portion of an object diagram for a library book check out system that shoWlSthe date a book is due and tFi.elate charges for an overdue book as derived objects. (10x2=20) a Prepare a states diagram for making transaction in an ATM machine.
J

(c)

4.

Attempt any two of the following:(a)

MCA...i.233

'"

(b)

Prepare states diagram for alwin-Tub, automatic washing machine having controls as follows: (i) (ii) (ill) (iv) (v) A Timer for Wash/Rinse. A Timer for Drier. A Drain Selector.

semiusual

A Water inlet Selector (Wash/Drier) A Program Selector (Wash and/ or Dry)

(c) 5.

What are Nested states Diagrams? Why they are useful? Explain with sui,table example. .
\'

Attempt

any two of the followiI1g

:-

(lOx2=20)

(a)

Prepare a Data Flow Diagram for computing the volume and surface area of a cylinder. Inputs are height and radius of the cylinder outputs are volume and surface area. Discuss several ways to implement tHe DFD. Prepare a DFD for Pay!oll company. system in a

(b) (c)

Explain the following with reference to Data Flow Diagrams: (i) (ii) Actors Data stores Control flows

'--"

(ill)

Give suitable examples for the above.


*** *** ***

MCA-233

You might also like