Sie sind auf Seite 1von 2

Sterling Institute of Management Studies

List of Assignments for Object Oriented Programming


with C++

Last Date of Submission (Practical & Theory) : 15th Nov 2010

Note :- 1) Students should submit all the assignments on the


Institute
stationery in their own handwriting. Prints or soft
copies of the
assignments will not be accepted.
2) In case two identical assignments are found, both
will not
be assessed.

1 Define and explain the following terms with 10


appropriate examples:
1. Objects
2. Classes
3. Reusability
4. Modularity

2 Compare Structured programming and Object 10


Oriented Programming. Give appropriate examples
to support your answer.

3 Write a Menu Based C++ Program to handle the 20


student database. The Program should be able to
Store, Retrieve, Append, Edit & Delete records.

4 Explain the concept of polymorphism. Discuss in 10


detail various types of polymorphism. Give
appropriate examples.

5 Explain various modes of opening files in C++. Also 10


explain the use of the get and put pointers and the
functions used to access and set them.
6 Define the following classes with the mentioned data members and 10
functions:-
PERSON

STUDENT PROFESSOR

class PERSON :- data members:-name , address ,age


member functions:- insert ,display
class STUDENT :- data members:-grade
member functions:- insert ,display
class PROFESSOR :- data members:-no. of publications
member functions:- insert ,display
Use virtual functions and display all the information.

7 Why do you need constructors in C++? Explain the need for 10


parameterized constructors in C++. Give Examples.

8 Explain the use of Pointers to Objects. Give 10


appropriate example.

9 Consider the following inheritence relationship:- 10


STUDENT
TEST SPORTS
RESULT

The class STUDENT has data member , roll_no & member functions
to get & display the roll_no. The class TEST has data members
marks1,marks2 & member functions to get & display the
marks.The class SPORTS has data member score & member
functions to get & display the score. The class RESULT is used to
total the marks and the score and display the total in its display
function

10 Define two classes A and B having an integer variable as a data 10


member in both of them. Use a function to swap their values and
display them.

Das könnte Ihnen auch gefallen