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

Object Oriented Programming - CS125

Uploaded by

bwork4758
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Object Oriented Programming - CS125

Uploaded by

bwork4758
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Roll No.

__________________ 07 March, 2017

Sarhad University, Peshawar


(Distance Education)

Paper : Object Oriented Programming - CS125 Examination: Final, Fall - 2016


Time Allowed: 3 hours Total Marks: 70, Passing Marks (35)
NOTE: Q.1 is compulsory, attempt any four question from the remaining. All questions carry equal marks. In
questions where example or syntax is required, half of the marks are for these items. Mobile phones
and other electronic gadgets are not allowed in the examination hall.

Q.1 Write Computer Program [14 Marks]

Write a Program to develop a Class Student with the detail as given below:
Student has Roll No, Name and Marks as Data members
Set Marks (to assign value of Marks) as member function
Show Result( to display values) as member functions.

Also develop at least two Student objects.


Set and Display the values of the Student objects in main() .

Q.2. (a) Define and provide syntax of Class and Object.


(b) Data encapsulation and information hiding are known as two basic advantages of object oriented
Programming, explain with help of example. (7+7)

Q.3. Define the given terms with syntax/example (14)


(a) Constructor, b) Destructor, c) Function overloading d) Operator overloading

Q.4 Define and provide syntax/example of provided terms. (7+7)


(a) Inheritance
(b) Base Class,
(c) Derived Class
(d) Multiple inheritance.
.
Q.5 Explain with example (14)
a) Public inheritance
b) Protected inheritance
c) Private Inheritance

Q.6 Define these terms with example (14)


(a) Polymorphism
(b) Virtual Function
(c) Friend Function
(d) Abstract Class

Q.7. Write short notes on any TWO of the following.


(a) Stream Classes (07)
(b) Pointers (07)
(c) Templates (07)

Object Oriented Programming - CS125-Fall - 2016 Page 1 of 1

You might also like