Object Oriented Programming UOG — University of Gujrat 2023
Discussion
Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.
No questions yet — be the first to ask.
Need a paper or stuck on a question? Ask here — students reply and you get an email.
Ask about a paper-
BS Islamic Studies, 5th semester, ISL-511 Translation of Holy Quran (3) — Government College University Faisalabad (GCU…
0 replies Reply → -
Civics course code GCCE101
1 reply Reply → -
BS 4the semester2025 civics and community engagement past paper According UOs
0 replies Reply → -
Bs public administration 1st semester mid term past papers
0 replies Reply → -
BS English from uni of Sargodha Functional English, history of old English literature, literary devices and genres,
0 replies Reply →
Paper text
UNIVERSITY OF GUJRAT
FINAL TERM EXAMINATIONS
SPRING-2023
Time Allowed: 150 Min
Total Marks: 60
Roll No: 22161519-013
Course Code: CS-103
Course Title: Object Oriented Programming
Section A
Q. 1:- Solve the following short questions: or 4x5 = 20 Marks
a. Differentiate the concepts of information hiding and encapsulation in object oriented technique of
programming..
b. Describe the importance of Encapsulation and data hiding in OOP with example.
c. Discuss the benefits of Inheritance in Classes and also explain the concept of generalization and
specialization in Inheritance.
d. How many types of constructors are used for creation of an object of a class, describe each with an
example ( only single line of code for each instantiation)?
Section B
Attempt essay questions any two out of three: 2x15 = 30 Marks
Q. 2: Design and code the classes BankAccount, Customer, and Bank. Include appropriate attributes and methods in
each class. Write a C++/JAVA (or any OOP-supporting language of your choice) implementation to
demonstrate the functionality of the banking system. You should create sample customer objects, open accounts
for them, perform deposit and withdrawal operations, and display account details in main function .
Q. 3: Implement Hierarchy of classes given in diagram And Add important attributes and functions to implement
following functionality for Car class only using a menus
that will be displayed to user
a. Add New Car
b. List all car records
c. Find car by registration no
d. Delete by registration no.
e. Exit.
Note: You can create an array of 100 objects as
collection
Vehicle
Car
Truck
Q. 4: Design and Code the classes Patient, Doctor, Appointment, and Hospital. Include appropriate attributes and
methods in each class. Write a C++/JAVA (or any OOP-supporting language of your choice) implementation to
demonstrate the functionality of the hospital management system. You should create sample patient and doctor
objects, schedule appointments, and display appointment and doctor details
(Continue Overleaf)