[go: up one dir, main page]

0% found this document useful (0 votes)
6 views15 pages

L1 Intro To OOP

The document outlines a course on Object-Oriented Programming (OOP), detailing expected outcomes, assessment methods, and comparisons between procedural and object-oriented programming. It highlights key OOP concepts such as encapsulation, inheritance, polymorphism, and data abstraction, emphasizing their benefits in software development. Additionally, it provides a brief history of C++ and its evolution from C, along with references for further reading.

Uploaded by

parishree1906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views15 pages

L1 Intro To OOP

The document outlines a course on Object-Oriented Programming (OOP), detailing expected outcomes, assessment methods, and comparisons between procedural and object-oriented programming. It highlights key OOP concepts such as encapsulation, inheritance, polymorphism, and data abstraction, emphasizing their benefits in software development. Additionally, it provides a brief history of C++ and its evolution from C, along with references for further reading.

Uploaded by

parishree1906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

SOFTWARE DEVELOPMENT FUNDAMENTALS-2

Introduction to object oriented programming

Lecture 1
Course Outcome
The following are expected outcomes from the students after the completion of this course,
Outcomes Cognitive level
CO1 Explain various object-oriented concepts like class and objects, constructors, abstraction, data hiding (access specifiers) etc. Understand Level (Level 2)

CO2 Apply object-oriented concepts like inheritance, polymorphism and templates to various real-world problems. Apply Level (Level 3)

CO3 Apply concepts of data structures such as arrays, stacks, queues, and linked lists to solve real-world problems. Apply Level (Level 3)

CO4 Analyze the source code for possible outcomes, exceptions, and debugging the errors. Analyse Level (Level 4)

CO5 Design and implement class diagram for varied real life problems using OOPs. Create Level (Level 6)
Assessment method
External Assessment –
◦ T1 – 20 Marks
◦ T2 – 20 Marks
◦ End Semester Exam – 35 Marks

◦ Internal Assessment : 25 Marks


C Vs C++
C is a structural or procedural programming language that was used
for system applications and low-level programming applications.
C++ is an object-oriented programming language having some
additional features like Encapsulation, Data Hiding, Data Abstraction,
Inheritance, Polymorphism, etc. This helps to make a complex project
more secure and flexible

The unit in procedural programming is function, and unit in object-


oriented programming is class
Procedural vs. Object-Oriented
Programming

Procedural programming concentrates on creating functions, while


object-oriented programming starts from isolating the classes, and
then look for the methods inside them.

Procedural programming separates the data of the program from


the operations that manipulate the data, while object-oriented
programming focus on both of them
Procedural vs Object Oriented
Procedural programming Object oriented programming
Divided into primitive entities called as Divided into primitive entities called as
functions. objects.
It gives preference to functions over It gives preference to data over
data. functions.
It doesn’t support data hiding, It supports data hiding, polymorphism
polymorphism and exception handling. and exception handling.
It doesn’t have access specifiers. It has access specifiers such as private,
public and protected.
Inclusion of new function and data is Inclusion of new function and data is
cumbersome. easier.
Example: C Example: C++, JAVA, Python
C++ (Object Oriented
Programming Language)
 C++ is one of the oldest programming languages.
 Bjarne Stroustrup invented it in 1979 in New Jersey at
Bell laboratories.
 Earlier, C++ is an extension of the C language.
 In 1982 novel features were introduced like operator
overloading, virtual functions, comments, and so on.
 In 1985 C++ was released for commercial
implementation, and in the year 1989, its second edition
was released
Introduction to object oriented
programming
• Object oriented programming emphasizes more on data than procedures.

• Each program is represented using objects.

• An object communicates with another object through functions.

• Data is hidden and protected from external functions. Object B

• It has following characteristics,


• Data Encapsulation
Object A
• Data hiding
• Data abstraction
• Inheritance Object C
• Polymorphism
Introduction to object oriented
programming
▪ Data Encapsulation binds data with its corresponding functions.

▪ Only those functions which are encapsulated together can access the data.
▪ These bounded functions acts like an interface that allows access to the data
for any program.
▪ By restricting the access to data, it provides data hiding from external
program.
Class A
Data
Functions
Introduction to object oriented
programming
▪ Data Abstraction shows only relevant information about the objects instead of
the entire background details.
▪ It separates the interface from its implementation.
▪ Classes are used to implement abstraction and they are called as abstract data
types (ADT).
▪ For example, the function cout is used as a interface to display on the console
and the internal implementation is not revealed to the outside world.
Introduction to object oriented
programming
▪ Inheritance is a way to include functionalities of a parent class to a child class.
▪ It doesn’t allow inheritance of private members from parent class.
▪ It enhances code reusability. Class A
Data
Functions

Class B
Data
Functions
Sub Class: The class that inherits properties from another class is called Sub
class or Derived Class.
Super Class: The class whose properties are inherited by sub class is called
Base Class or Super class.
Introduction to object oriented
programming
▪ Polymorphism enables to define many forms of a function and it is
invoked based on the object calling it.
▪ The functionality of a function differs according to the object that
calls it.
Class A
▪ Inheritance helps to implement polymorphism.
Data
Functions

Class B
Data
Functions
Benefits of object oriented
programming
▪ Data hiding helps to protect the data and it secures the programs.
▪ Exception handling can be performed using OOP.
▪ Program templates can be developed and used in future applications.
▪ Programs can be easily upgraded and portable.
▪ Reduces redundant codes and improves code reusability.
▪ Improves productivity by saving development time.
References
▪Herbert Schildt, “C++: The complete reference”, Mc Graw Hill Osborne media, 4th edition, 2017

▪Robert Lafore, “Object oriented programming in C++”, SAMS, 4th edition, 2002

You might also like