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

Opp

This document contains a BE semester exam for the course OPPs (Object Oriented Programming and Problem Solving). The exam contains 7 questions testing knowledge of concepts like PPL vs OOP, features of OOP, class usage, constructors and destructors, operator overloading, inheritance, templates, data structures, object oriented analysis, and visual programming. Students are required to answer all questions in their own words within the allotted 3 hour time limit. The exam is out of a total of 100 marks.

Uploaded by

sushil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views

Opp

This document contains a BE semester exam for the course OPPs (Object Oriented Programming and Problem Solving). The exam contains 7 questions testing knowledge of concepts like PPL vs OOP, features of OOP, class usage, constructors and destructors, operator overloading, inheritance, templates, data structures, object oriented analysis, and visual programming. Students are required to answer all questions in their own words within the allotted 3 hour time limit. The exam is out of a total of 100 marks.

Uploaded by

sushil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

POKHARA UNIVERSITY

Level: Bachelor Semester – Fall Year : 2003


Programme: BE Full Marks: 100
Course: OPPs Time : 3hrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1. a) Give the difference between PPL and OOP. Give the pseudo code and 4+4
flowchart for binary search technique.
b) Give some features of object-oriented programming. How we use a 4+1+2
class by program? Give the appropriate program.
2. a) Explain how data and function are organised in OOP. Write a program 3+5
to display the name of the day in a week, depending upon the day in a
week, depending upon the number entered using switch case
statement.
b) Why constructions and destructors are used? What do you mean by 2+2+1+2

constructor over loading. Can multiple constructors be there in a


program? Justify your answer.
3. a) What do you mean by overloading binary operations? Explain its 8
difference with overloading unary operations. What is type
conversion. Give examples.
b) Explain the following program and give its output 7
class complex
{float x,y ;
public:
complex() {}
complex (float real, float imag)
{ x=real;
y=imag;
}
complex operator +(complex);
void display (void);
};
complex complex::operator +(complex c)
complex temp;
temp.x = x +c.x;
temp.y = y +c.y;
return (temp);
}
void complex ::display (void)
{ cout <<x<<"+j"<<y<<"\n";
}
main()
{
complex c1,c2,c3;
c1=complex(2.5,3.5);
c2=complex (1.6,2.7);
c3 = c1+c2;
cout<<"c1=";c1.display();
cout<<"c2=";c2 display();
cout<<"c3="; c3.display();
}

4. a) Develop an object oriented program to create a library information 6


system containing the following information for all the books in the
library:
Accession Number, Name of the author, Title of the Book, Year of
publication, Publisher's name, Cost of the Book.
b) Consider a class network in the figure below. The class master derives 9
information from both account and admin to create, update and
display the information contained in master objects. Write the
program.
5. a) Can we define template for both classes and functions? If yes/no write 2+6
programs to show both.
b) What are stack and queue data structures? Give the difference 2+2+3
between them. Write a program using push and pop operation?
6. a) What is object oriented analysis? Explain the steps in object oriented 3+5
analysis.
b) What do you mean by visual programming? Explain one of the two
3+4
approaches by which objects may be analyzed, in terms of real-word
objects as will as the abstract objects.
7. Write short notes (Any Two). 52
(a) Iterative techniques
(b) Inline functions
(c) Function overloading
(d) Functional modeling.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy