0% found this document useful (0 votes)
7 views8 pages

Introduction to Object-Oriented Programming

The document introduces Object-Oriented Programming (OOP) and contrasts it with procedural programming, emphasizing the organization and reusability of code through real-world object representation. Key concepts of OOP include classes, encapsulation, abstraction, inheritance, and polymorphism. The document concludes by summarizing the importance of OOP in creating manageable and scalable programs.

Uploaded by

nimra bawany
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)
7 views8 pages

Introduction to Object-Oriented Programming

The document introduces Object-Oriented Programming (OOP) and contrasts it with procedural programming, emphasizing the organization and reusability of code through real-world object representation. Key concepts of OOP include classes, encapsulation, abstraction, inheritance, and polymorphism. The document concludes by summarizing the importance of OOP in creating manageable and scalable programs.

Uploaded by

nimra bawany
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

Introduction to Object-Oriented

Programming (OOP)
First Theory Class | C++ Programming
What is Programming?
• Programming is the process of creating a set
of instructions that tell a computer how to
perform a task.

• Real-world example:
• - Recipe for making tea
• - Instructions to a robot
Procedural vs Object-Oriented
Programming
• - Procedural: Focus on functions and
procedures
• Example: Making tea step-by-step (boil water,
add tea, etc.)

• - Object-Oriented: Focus on objects that


represent real-world entities
• Example: 'TeaMaker' object that knows how
to make tea
Why Object-Oriented
Programming?
• - Real-world mapping: Represent cars,
students, accounts as objects
• - Makes code reusable and organized
• - Easier to maintain and scale
Why study OOP?
• Object-Oriented Programming (OOP) is needed
because it helps us write code in a way that is
more organized and easier to understand. In OOP,
we think of everything as objects, just like in real
life. For example, a car is an object—it has
properties like color and speed, and actions like
start or stop. OOP makes it easier to build and
manage large programs by breaking them into
small parts (objects). It also allows us to reuse
code.
Real-World Example of Object
• Object: Car
• - Properties: color, brand, speed
• - Behaviors: start(), stop(), accelerate()

• We can model this in code using a class!


Key Concepts of OOP
• - Class and Object
• - Encapsulation
• - Abstraction
• - Inheritance
• - Polymorphism
Summary & What's Next
• Today:
• - Understood what OOP is and why it's needed
• - Real-life examples of objects

You might also like