- Type
- Midterm past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 3.4 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 121. Download the file for all 121 pages.
CS304 Mid term Notes
Lec 1 to 22
Lecture No.01 Object-Orientation (OO)
What is Object-Orientation?
A system in which we deal with our programming problems in the form of Objects and their relations in real life.
For example
(School), the objects in a school are student, teacher, books, pen, school bag, classroom, parents, playground etc.
What is a Model?
A model is a small copy/object of something real/abstract/ tangible/conceptual. Objects have their attributes (color/model), operations (working) & identity. For example:
- Highway maps
- Architectural models
- Mechanical models
Object oriented Model?
Object oriented model show some interacting objects to understand a system given to us for execution. Advantages:
I. It is easy to understand II. It can be easily develop because it is closer to real life. III. It is easy to implement using any object Oriented language like c++.
What is an Object?
In object-oriented programming (OOP), objects are the things you think about first in designing a program and they are also the units of code that are eventually derived from the process. Tangible and Intangible Objects
Tangible Objects
Intangible Objects
Ali is a tangible object, have some Behavior and attributes such as name ,age etc. Time is an intangible object that have some state (hours, seconds,, minutes)
Lecture No.02 Lecture Contents
What is information hiding?
We have objects with their attributes and behaviors that are hidden from other classes. Object oriented programming follows the principle of information hiding.
Information Hiding is achieved using the following principles,
Information is stored within the object. It is hidden from the outside world. It can only be manipulated by the object itself. Example
Information Hiding Advantages
What is Encapsulation?
Encapsulation means “we have enclosed all the characteristics of an object in the object itself”. Object characteristics include data members and behavior of the object in the form of functions.
Example
Encapsulation Advantages
What is Interface?
Interface is a set of functions of an object that he wants to expose to other objects. We have to use the concept of interface of the object to expose its behavior to outer word objects.
Example Interface of a Car
What is Implementation?
It is actual implementation of the behavior of the object in any Object Oriented language. It has two parts,
- Internal data structures to hold an object state that will be hidden from us it will store values for an object data members.
- Functionality in the form of member functions to provide required behavior.
Separation of Interface & Implementation
The benefit of using this approach is that our object interface to outside word becomes independent from inside implementation of that interface. This is achieved through the concepts of encapsulation and information hiding.
Related CS304 files
All CS304 files →- CS304 Midterm Past Papers File 2 Midterm PDF 1.9 MB
- CS304 Midterm Past Papers File 3 Midterm PDF 1.7 MB
- CS304 Midterm MCQs Midterm PDF 268 KB
- CS304 Midterm MCQs with References by Moaaz Midterm PDF 326 KB
- CS304 Highlighted Handouts by MAS All Rounder Highlighted PDF 3.6 MB
- CS304 Quiz 4 by VU Topper RM Quiz PDF 654 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.