Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 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