Object Oriented Systems and C++4
Object Oriented Systems and C++4
Printed Pages - 3
I I I I I I
MCA
I I I
- 233
I
Roll No.
AND C++
Total Marks: 100
'-"Time:
Note:
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.
-'
.
(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)
;,
~
(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.
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
(c) 5.
What are Nested states Diagrams? Why they are useful? Explain with sui,table example. .
\'
Attempt
:-
(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)
MCA-233