Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 41 páginas
Notas de lectura

OODP C++ Notes

Document preview thumbnail
Vista previa 4 fuera de 41 páginas

Lecture notes of 41 pages for the course 21CSC101T at SRM INSTITUTE OF SCIENCE AND TECHNOLOGY (Unit-1 Notes)

Vista previa del contenido

21CSC101T - OBJECT ORIENTED DESIGN AND
PROGRAMMING (Unit 1)
Introduction
Object Oriented Programming
 OOP is a programming paradigm / model that organizes software
 design around data or objects rather than functions
 Object is a basic unit of OOP, It can be defined as data field that has
 unique attributes and behavior.
 Aims to implement real world entities like inheritance, hiding, polymorphism etc in
programming
  Bind data and functions together
 Functions associated with the data object can only access this data, No other part of code
 can access
 Code reusable - easily maintain and modify existing code

Object Oriented Design
 It is the process of using an object oriented methodology to design a computing system or
 application
 Provides a system of interacting objects for the purpose of solving a software problem

Comparison of Procedural and Object-Oriented Programming
Procedure Oriented/ Structure
S.No Object Oriented Programming
Programming
1. It follows top down approach. It follows bottom up approach.
Program is divided into small parts Program is divided into small parts called
2.
called functions objects.

3. function is more important than data. data is more important than function
There is no access specifier in have access specifiers like private, public,
4.
procedural programming. protected etc.
It is less secure than OOPs. Because Data hiding is possible, hence more secure
5.
no data hiding. than procedural.
Data moves freely within the system In OOP, objects can move and communicate
6.
from one function to another. with each other via member functions.

, overloading is not possible. Overloading is possible in object oriented
7.
programming.
No inheritance. inheritance is present in object-oriented
8.
programming.
There is no code reusability. Adding It offers code reusability by using the
9. new data and function in POP is not so feature of inheritance. OOP provides an easy
easy. way to add new data and function.

10. Does not Supports Polymorphism Supports Polymorphism

11. Does not Supports Virtual Functions Supports Virtual Functions
Examples: C, FORTRAN, Pascal, Examples: C++, Java, Python, C# etc.
12.
Basic etc.


OOPS and its features
1. Objects
2. Classes
3. Encapsulation
4. Data abstraction
5. Polymorphism
6. Inheritance
7. Dynamic binding
8. Message passing

1. Objects:
 Basic unit of Oops
 Instant of a class
 Run time entity
 Has object name, data(attributes), Methods(functions)

Student Colour
Name price
Roll no
Mark Getdata()
Getmark() Process()
Get Result()


Car



Page No.2

,2. Class

 Template or blueprint that describes the object
 Has class name, attributes (data members), Methods
 Memory is allocated at run time when object created

Student
Name
Roll no
Mark
Getmark()
Get Result()




3. Encapsulation:

  Wrapping of data and functions together as a single unit is known as encapsulation.
 By default data is not accessible to outside world and they are only accessible through
 the functions which are wrapped in a class.
 prevention of data direct access by the program is called data hiding or information
hiding




Page No.3

, 4. Data abstraction:
Data abstraction provides /exposes only essential features (like interface details) and hides
background details (Implementation details).

Class use the concept of data abstraction so they are called abstract data type (ADT)
5.Polymorphism:

Polymorphism means the ability to take more than one form. For example, an operation have
different behavior in different instances. The behavior depends upon the type of the data used
in the operation.

Polymorphism comes from the Greek words “poly” and “morphism”. “poly” means many and
“morphism” means form i.e.. many forms.




6.Inheritance:

Inheritance is the process of creating new classes by deriving the properties and
characteristics from another existin class.


 It helps realize the goal of constructing software from reusable parts, rather than hand
coding every system from scratch.
 When the class child, inherits the class parent, the class child is referred to as derived
class (sub class) and the class parent as a base class (super class).
 In this case, the class child has two parts:
- a derived part and an incremental part.
- The derived part is inherited from the class parent.
- The incremental part is the new code written specifically for the class child.

7. Dynamic binding:

Binding refers to linking of procedure call to the code to be executed at the run time.


CSE Page No.4

Información del documento

Subido en
11 de febrero de 2024
Número de páginas
41
Escrito en
2023/2024
Tipo
Notas de lectura
Profesor(es)
Dr.saparshi gupta
Contiene
Todas las clases
$10.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
2
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes