University Of Peshawar Computer Science (Part-II) Paper-C 2006 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 Q1.a) Discuss the disadvantages of Traditional File Processing System. b) Discuss advantages of database system. Q2.a) What is meant by Association? b) Discuss Types of Association. c) What does the Cardinality of an Association mean? Q3.
Draw an ERD for the following relations. CUSTOMER (Customer-ID, Customer-Name, Customer Address) ORDER (Order-ID, Order Date, Customer-ID) Whereas, the association name between the above entities is submits. Q4.a) What is meant by Normalization? b) Discuss the following: (i) First Normal Form (ii) Second Normal Form (iii) Third Normal Form c) Define Insertion Anomaly and Deletion Anomaly. SECTION-B Q5.
a) Discuss the following characteristics of Object Oriented Programming. (i) Objects and Classes. (ii) Identity (iii) Encapsulation (iv) Polymorphism b)
Discuss the difference between a structure and a class.
Q6.
a) What is meant by Inheritance? b) Discuss the following Visibility Modifiers and Access Specifier. (i) Public (ii) Static (iii) Private (iv) Protected c) Write a program in C++ to demonstrate Inheritance. Q7. a) Define Virtual Functions, Explain the use of Virtual Functions. b) Write a program in C++ for a base class that has a pure Virtual function starline(). One of its derived class implements this function for drawing a horizontal line, while its second derived class implements it for drawing a vertical line of asterisks. The program must execute the two implementations by using an identical function call. Q8. a) What does Function Overloading mean? b) Write a C++ program to implement an overloaded function cale() taking two arguments. If both of the arguments are of type Int, the overloaded function multiplies them. If both the arguments are of type float, the overloaded function adds them. Q9. a) Define Operator Overloading. b) Write a C++ program for a class that overloads the Unary operator. Increment the class member count with it and print the result. Q10. Write short notes on any two of the following: (i) Inline function. (ii) Late binding. (iii) Overloaded constructors (iv) Function prototype, Definition, and call. -----------------------------------------------