0% found this document useful (0 votes)
35 views2 pages

Paper C 2003

This document is an exam paper for a University of Peshawar Computer Science course. It contains 10 questions split into two sections - Section A contains 5 questions about database concepts, and Section B contains 5 questions about object-oriented programming concepts. Students are instructed to answer a total of 5 questions by selecting 2 from Section A and 3 from Section B. The exam is worth a total of 25 marks and lasts 3 hours.

Uploaded by

api-19663123
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 DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Paper C 2003

This document is an exam paper for a University of Peshawar Computer Science course. It contains 10 questions split into two sections - Section A contains 5 questions about database concepts, and Section B contains 5 questions about object-oriented programming concepts. Students are instructed to answer a total of 5 questions by selecting 2 from Section A and 3 from Section B. The exam is worth a total of 25 marks and lasts 3 hours.

Uploaded by

api-19663123
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 DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

University Of Peshawar

Computer Science (Part-II)


Paper-C
2003
Time: 3 hrs Maximum Marks: 25

Note: Attempt any FIVE questions selecting TWO questions from section-A
and three from section-B. All questions carry equal marks.

SECTION-A

Q.1 What is data model? Explain with examples different database


models.
Q.2 Compare and contrast the following:
a). Composite Key and Compound Key.
b). Primary Key and Foreign Key.
c). Security and Integrity.
d). Logical Model and Physical Model.
e). Database Approach and Traditional Approach.
Q.3 What is relational Algebra? Explain with examples the selection and
projection process in relational algebra.
Q.4 Consider the Following Table:
CUSTOMER
C-No Name City Balance Age
010 Ali ISB 1000 30
0120 Akbar LHR 2000 35
030 John LHR 1500 40
040 Khan PSR 5000 28
050 Safeer LHR 500 45

Write SQL queries for the following:


a). List out those customers whose balance is greater than 2000.
b). List Names of Lahore-based customers.
c). List out the customers whose balance is less than 2000 and not living
Islamabad.

SECTION-B
Q.5 What is meant by Object Oriented Programming? What are its
advantages over structured programming?

Q.6 Define and explain the following terms with examples:


a). Class b). Objects
c). Single Inheritance d). Constructor
d). Destructor
Q.7 Write a program-using constructor to find the slope and length of a
straight line.
Q.8 What is meant by overloading? Write an OOP to overload prefix
operator to decrement the value of a member variable count.
Q.9 a). Write a statement that defines an array called many birds that
holds 20 objects of type bird.
b). What is the purpose of scope resolution operator?
c). How do you make a class member visible outside the class?
Q.10 Write short notes on any two of the following
a). Polymorphism
b). Level of Inheritance
c). Friends Functions.

------------------------------------------

You might also like