KEMBAR78
OOP-Advanced_Programming.pptx
Object Oriented
Programming
Mohamed Essam
- Procedural Programming
- Focus on processes or actions that a program takes
- Programs are typically a collection of functions
- Data is declared separately
- Data is passed as arguments into functions
As Programs get larger they become more:
 Difficult to understand
 Difficult to maintain
 Difficult to extend
 Difficult to debug
 Difficult to code
- Coding Paradigm
https://www.freecodecamp.org/news/an-introduction-to-programming-paradigms/
Object Oriented
Programming
Object-oriented programming (OOP) is a programming paradigm based on
the concept of "objects", which can contain data and code: data in the form of
fields (often known as attributes or properties), and code, in the form of
procedures (often known as methods).
- Encapsulation
- Objects contain data and operations that work on that data
- Abstract Data Type ( ADT)
09:Object Oriented Programming
Object Oriented Programming
“Abstraction mean Simplify The Reality”
09:Object Oriented Programming
“Just all we need about the person”
09:Object Oriented Programming
“Just all we need about the person”
Object Oriented
Programming
- Information - Hiding
- Encapsulation
- Implementation - specific logic be hidden
- User of class code to be interface since they don’t need to know the
implementation
- More abstraction
- Easier to test, debug, maintain and extend
Object Oriented
Programming
- Reusability
- Easier to reuse classes in order application
- Faster development
- Higher quality
09:Object Oriented Programming provide
code reuse
 Code reuse is the practice of using existing code for a new function or
software.
 This saves time, improves the features in your program, and generally makes
for more cost-effective programming. Reusability is an important issue in
software engineering.
Object Oriented
Programming
- Inheritance
- Can create new classes in term of existing classes
- Reusability
- Polymorphic classes
Object Oriented Programming- provide
Inheritance
09:Object Oriented Programming
Name
Attributes
Actions
09:Object Oriented Programming
A class is an extensible program-code-template for creating objects,
although a very tiny application might need just a single class. The
class must go within a pair of curly braces.
Class design like Blueprint
architecture
Class design
Class design
Class design
Class design
The interface of the
class(Abstraction)
All you need to know to know how to use
The interface of the
class(Abstraction)
All you need to know to know how to use
09:Object Oriented Programming
09:Object Oriented Programming provide
code reuse
 Code reuse is the practice of using existing code for a new function or
software.
 This saves time, improves the features in your program, and generally makes
for more cost-effective programming. Reusability is an important issue in
software engineering.
Create Class using unified
modeling language UML
Accessing Class
 We can access
- Class attributes
- Class methods
 Some class members will not be accessible (more on that later)
 We need an object to access instance variables
Class Access Modifier
- public , private and protected
- public
- Accessible everywhere
- private
- Accessible only by members or friends of the class
- protected
- Used with inheritance - we’ll talk about it in the next section
Class Access Modifier
- public , private and protected
- public
- Accessible everywhere
- private
- Accessible only by members or friends of the class
- protected
- Used with inheritance - we’ll talk about it in the next section
Class Access Modifier
- public , private and protected
- public
- Accessible everywhere
- private
- Accessible only by members or friends of the class
- protected
- Used with inheritance - we’ll talk about it in the next section
Class Access Modifier
- public , private and protected
- public
- Accessible everywhere
- private
- Accessible only by members or friends of the class
- protected
- Used with inheritance - we’ll talk about it in the next section
Class Access Modifier
- public , private and protected
- public
- Accessible everywhere
- private
- Accessible only by members or friends of the class
- protected
- Used with inheritance - we’ll talk about it in the next section
What are setters and getters?
Getters and setters are used to protect your data, particularly when creating
classes. For each instance variable, a getter method returns its value while a setter
method sets or updates its value. Given this, getters and setters are also known as
accessors and mutators, respectively.
What is a abstract?
By definition, an abstract class in C++ is a class that has at
least one pure virtual function (i.e., a function that has no
definition).
What is a C++ abstract class?
By definition, an abstract class in C++ is a class that has at
least one pure virtual function (i.e., a function that has no
definition).
What is a C++ abstract class?
Abstract classes are essential to providing an abstraction to
the code to make it reusable and extendable.
For example, a Vehicle parent class
with Truck and Motorbike inheriting from it is an
abstraction that easily allows more vehicles to be added.
However, even though all vehicles have wheels, not all
vehicles have the same number of wheels – this is where
a pure virtual function is needed.
What is a C++ abstract class?
What is a C++ abstract class?
Inhertance
CREDITS: This presentation template was created by Slidesgo,
including icons by Flaticon, and infographics & images by Freepik
Thanks

OOP-Advanced_Programming.pptx

  • 1.
  • 2.
    - Procedural Programming -Focus on processes or actions that a program takes - Programs are typically a collection of functions - Data is declared separately - Data is passed as arguments into functions As Programs get larger they become more:  Difficult to understand  Difficult to maintain  Difficult to extend  Difficult to debug  Difficult to code
  • 3.
  • 4.
    Object Oriented Programming Object-oriented programming(OOP) is a programming paradigm based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). - Encapsulation - Objects contain data and operations that work on that data - Abstract Data Type ( ADT)
  • 5.
  • 6.
    Object Oriented Programming “Abstractionmean Simplify The Reality”
  • 7.
    09:Object Oriented Programming “Justall we need about the person”
  • 8.
    09:Object Oriented Programming “Justall we need about the person”
  • 9.
    Object Oriented Programming - Information- Hiding - Encapsulation - Implementation - specific logic be hidden - User of class code to be interface since they don’t need to know the implementation - More abstraction - Easier to test, debug, maintain and extend
  • 10.
    Object Oriented Programming - Reusability -Easier to reuse classes in order application - Faster development - Higher quality
  • 11.
    09:Object Oriented Programmingprovide code reuse  Code reuse is the practice of using existing code for a new function or software.  This saves time, improves the features in your program, and generally makes for more cost-effective programming. Reusability is an important issue in software engineering.
  • 12.
    Object Oriented Programming - Inheritance -Can create new classes in term of existing classes - Reusability - Polymorphic classes
  • 13.
    Object Oriented Programming-provide Inheritance
  • 14.
  • 15.
    09:Object Oriented Programming Aclass is an extensible program-code-template for creating objects, although a very tiny application might need just a single class. The class must go within a pair of curly braces.
  • 16.
    Class design likeBlueprint architecture
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
    The interface ofthe class(Abstraction) All you need to know to know how to use
  • 22.
    The interface ofthe class(Abstraction) All you need to know to know how to use
  • 23.
  • 24.
    09:Object Oriented Programmingprovide code reuse  Code reuse is the practice of using existing code for a new function or software.  This saves time, improves the features in your program, and generally makes for more cost-effective programming. Reusability is an important issue in software engineering.
  • 25.
    Create Class usingunified modeling language UML
  • 26.
    Accessing Class  Wecan access - Class attributes - Class methods  Some class members will not be accessible (more on that later)  We need an object to access instance variables
  • 27.
    Class Access Modifier -public , private and protected - public - Accessible everywhere - private - Accessible only by members or friends of the class - protected - Used with inheritance - we’ll talk about it in the next section
  • 28.
    Class Access Modifier -public , private and protected - public - Accessible everywhere - private - Accessible only by members or friends of the class - protected - Used with inheritance - we’ll talk about it in the next section
  • 29.
    Class Access Modifier -public , private and protected - public - Accessible everywhere - private - Accessible only by members or friends of the class - protected - Used with inheritance - we’ll talk about it in the next section
  • 30.
    Class Access Modifier -public , private and protected - public - Accessible everywhere - private - Accessible only by members or friends of the class - protected - Used with inheritance - we’ll talk about it in the next section
  • 31.
    Class Access Modifier -public , private and protected - public - Accessible everywhere - private - Accessible only by members or friends of the class - protected - Used with inheritance - we’ll talk about it in the next section
  • 32.
    What are settersand getters? Getters and setters are used to protect your data, particularly when creating classes. For each instance variable, a getter method returns its value while a setter method sets or updates its value. Given this, getters and setters are also known as accessors and mutators, respectively.
  • 33.
    What is aabstract? By definition, an abstract class in C++ is a class that has at least one pure virtual function (i.e., a function that has no definition).
  • 34.
    What is aC++ abstract class? By definition, an abstract class in C++ is a class that has at least one pure virtual function (i.e., a function that has no definition).
  • 35.
    What is aC++ abstract class? Abstract classes are essential to providing an abstraction to the code to make it reusable and extendable. For example, a Vehicle parent class with Truck and Motorbike inheriting from it is an abstraction that easily allows more vehicles to be added. However, even though all vehicles have wheels, not all vehicles have the same number of wheels – this is where a pure virtual function is needed.
  • 36.
    What is aC++ abstract class?
  • 37.
    What is aC++ abstract class?
  • 38.
  • 39.
    CREDITS: This presentationtemplate was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik Thanks