Focused more for interview Perspective and Easy Understanding
Object-Oriented Programming (OOP) is a software development paradigm that suggests developers to split a program in building blocks known as objects. The OOP paradigm allows developers to define the object's data, functions, and its relationship with other objects.
Code Reusability Enables to model real world object Easy Modification Easy Maintenance More Flexible
Defines an Abstract thing of a thing (i.e. Object) Explaining its Behavior A user-defined data structure that groups properties and methods. Class doesn’t occupies memory. Class is a definition Abstract classes are classes that can have no instances
A Single entity Which holds Data and Method. It’s Structure. Should be understandable by a non- Programmer DOG (Class) Color, Shape ( Characteristic ) Bark, Pee, Run ( Behaviors ) Members Abstract characteristics  of a thing  Fields  - _Color Properties - Color Fields  - _Color Properties - Color
Specify Class Name Declare Data members Declare Methods Define the Processing
Program them in the following order: Namespace:  The namespace is a keyword that defines a distinctive name or last name for the class. A namespace categorizes and organizes the library (assembly) where the class belongs and avoids collisions with classes that share the same name.  Class declaration:  Line of code where the class name and type are defined.  Fields:  Set of variables declared in a class block.
Constants:  Set of constants declared in a class block.  Constructors:  A method or group of methods that contains code to initialize the class.  Properties:  The set of descriptive data of an object.  Events:  Program responses that get fired after a user or application action.  Methods:  Set of functions of the class.
Destructor:  A method that is called when the class is destroyed.  In managed code, the Garbage Collector is in charge of destroying objects; however, in some cases developers need to take extra actions when objects are being released, such as freeing handles or de-allocating unmanaged objects.  In .NET, there is no concept of deterministic destructors. The Garbage Collector will call the Finalize() method at a non-deterministic time while reclaiming memory for the application.
 
Access keywords Access keywords define the access to class members from the same class and from other classes. The most common access keywords are: Public:  Allows access to the class member from any other class.  Private:  Allows access to the class member only in the same class.  Protected:  Allows access to the class member only within the same class and from inherited classes.
Internal:  Allows access to the class member only in the same assembly.  Protected internal:  Allows access to the class member only within the same class, from inherited classes, and other classes in the same assembly.  Static:  Indicates that the member can be called without first instantiating the class.
A particular Instance of a Class Objects are the building blocks of OOP Represent real world things in an abstract way Commonly defined as variables or data structures that encapsulate behavior and data in a programmed unit The objects will all act as independent units in their own right, and they will be responsible for carrying out a certain process
Object identity:   Every object is unique and can be differentiated from other objects. Each time and object is created (instantiated) the object identity is defined.  Object behavior:   What the object can do. In OOP, methods work as functions that define the set of actions that the object can do.  Objec t state:   The data stored within the object at any given moment. In OOP, fields, constants, and properties define the state of an object.
Inheritance Abstraction Polymorphism Encapsulation Event
Is like inheriting the abstract characteristics from other class - It is a kind of hierarchy  Base Class will be inherited to derived class is a way to form new classes using classes that have already been defined is-a  relationships represent a hierarchy between classes of objects Use:  Reuse of Code – uses the attributes of the base class Extensibility – Has it’s own Attributes
Simple / Single Multilevel Hierarchical Multiple Hybrid
Superclass: Parent class Subclass: Child class Base class: Parent class Derived class: Child class
Is like inheriting from more than one base class. .Net do not allow. But using Multiple interface inheritance this can be achieved.
Information Hiding Visibility to the methods and not to the fields E.g. A Report designer for a programmer Packs the data and Method and protects from external tampering Exposing only the details that are relevant: the  public interface Improves Security
Protected cName as string Protected Function ChangeName(NewName)     Me.cName = NewName End Function
As we cannot hide entire object we give access to some specific part of data. Conceptual boundaries of an object Focuses on the essential characteristics of an object a named entity made up of selected attributes and behavior specific to a particular usage of the originating entity Improves Security For example see notes below
One entity existing in multiple forms Behavior depends on the type of data Same message to diff objects results in different behavior Linked to inheritance and assures that derived class to override the implementation of parents methods.
Class Employee     Function PayEmployee()        PayEmployee = Hours * HourlyRate     End Function Class CommissionedEmployee     Inherits Employee     Overrides Function PayEmployee()        PayEmployee = BasePay + Commissions     End Function
Upcasting  Casting an object of any type to another type which is above it in the inheritance hierarchy. Downcasting  Casting an object of any type to another type which is below it in the inheritance hierarchy.  Example Sealed Class When applied to a class, the sealed modifier prevents other classes from inheriting from it.
static classes and static methods are used to create data and functions that can be accessed without creating an instance of the class. class CompanyInfo {     public string GetCompanyName() { return "CompanyName"; }     public string GetComAddress() { return "ComAddress"; }   These methods do not need to be attached to a specific instance of the class. Therefore, instead of creating unnecessary instances of this class, you can declare it as a static class, like this: static class CompanyInfo {   public static string GetCompanyName() {return "CompanyName";}   public static string GetComAddress()  {return "ComAddress";}
www.c-sharpcorner.com www.csharpcorner.com 2 www.kuro5hin.org www.informit.com www.forums.asp.net www.developerfusion.com www.msdn.microsoft.com

More Related Content

PPTX
Introduction to Object Oriented Programming
PPT
Use case Diagram
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
PDF
Oops concepts || Object Oriented Programming Concepts in Java
PPTX
Java program structure
PPT
Object Oriented Language
PPT
Oop Presentation
PPTX
Fundamentals of OOP (Object Oriented Programming)
Introduction to Object Oriented Programming
Use case Diagram
Basic Concepts of OOPs (Object Oriented Programming in Java)
Oops concepts || Object Oriented Programming Concepts in Java
Java program structure
Object Oriented Language
Oop Presentation
Fundamentals of OOP (Object Oriented Programming)

What's hot (20)

ODP
OOP java
PPT
Basic concepts of object oriented programming
PPTX
Overview of UML Diagrams
PDF
Types of UML diagrams
PPTX
concept of oops
PDF
Class and Objects in Java
PPTX
OOPS In JAVA.pptx
PPT
Object and class relationships
PPTX
JavaScript Conditional Statements
PPT
Packages in java
PPT
Oops ppt
PPTX
Interface in java
PPTX
Association agggregation and composition
PPT
Object-oriented concepts
PPTX
Classes objects in java
PPTX
Features of java
PPTX
Ooad unit – 1 introduction
PDF
java ppt.pdf
PDF
itft-Decision making and branching in java
PDF
Introduction to Design Pattern
OOP java
Basic concepts of object oriented programming
Overview of UML Diagrams
Types of UML diagrams
concept of oops
Class and Objects in Java
OOPS In JAVA.pptx
Object and class relationships
JavaScript Conditional Statements
Packages in java
Oops ppt
Interface in java
Association agggregation and composition
Object-oriented concepts
Classes objects in java
Features of java
Ooad unit – 1 introduction
java ppt.pdf
itft-Decision making and branching in java
Introduction to Design Pattern
Ad

Similar to Oops (20)

PDF
oops-123991513147-phpapp02.pdf
PPTX
OOP Presentation.pptx
PPTX
OOP Presentation.pptx
PPTX
Fundamentals of oops in .Net
PPTX
An overview of Object Oriented Programming in C#.
PPTX
object oriented programing lecture 1
DOC
C# by Zaheer Abbas Aghani
DOC
C# by Zaheer Abbas Aghani
PPTX
Introduction to oop
PPTX
Is2215 lecture2 student(2)
PDF
L1-Introduction to OOPs concepts.pdf
PPTX
DOCX
Question and answer Programming
PPT
Object -oriented analysis and design.ppt
PPTX
03 classes interfaces_principlesofoop
PPTX
SKILLWISE - OOPS CONCEPT
PPTX
Module 6 : Essentials of Object Oriented Programming
PPTX
PPTX
Object-oriented programming
oops-123991513147-phpapp02.pdf
OOP Presentation.pptx
OOP Presentation.pptx
Fundamentals of oops in .Net
An overview of Object Oriented Programming in C#.
object oriented programing lecture 1
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
Introduction to oop
Is2215 lecture2 student(2)
L1-Introduction to OOPs concepts.pdf
Question and answer Programming
Object -oriented analysis and design.ppt
03 classes interfaces_principlesofoop
SKILLWISE - OOPS CONCEPT
Module 6 : Essentials of Object Oriented Programming
Object-oriented programming
Ad

More from Sankar Balasubramanian (6)

PDF
Hari Sankar - Kusters Engineering India
PPTX
Geniies - Portfolio
PPSX
Hari Sankar - Kusters Engineering India
Geniies - Portfolio

Recently uploaded (20)

PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
The various Industrial Revolutions .pptx
DOCX
search engine optimization ppt fir known well about this
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPTX
Modernising the Digital Integration Hub
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
STKI Israel Market Study 2025 version august
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
Chapter 5: Probability Theory and Statistics
PPT
What is a Computer? Input Devices /output devices
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
A comparative study of natural language inference in Swahili using monolingua...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
sbt 2.0: go big (Scala Days 2025 edition)
The various Industrial Revolutions .pptx
search engine optimization ppt fir known well about this
Credit Without Borders: AI and Financial Inclusion in Bangladesh
UiPath Agentic Automation session 1: RPA to Agents
Modernising the Digital Integration Hub
Abstractive summarization using multilingual text-to-text transfer transforme...
1 - Historical Antecedents, Social Consideration.pdf
OpenACC and Open Hackathons Monthly Highlights July 2025
A contest of sentiment analysis: k-nearest neighbor versus neural network
STKI Israel Market Study 2025 version august
Microsoft Excel 365/2024 Beginner's training
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Getting started with AI Agents and Multi-Agent Systems
Chapter 5: Probability Theory and Statistics
What is a Computer? Input Devices /output devices
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
A comparative study of natural language inference in Swahili using monolingua...

Oops

  • 1. Focused more for interview Perspective and Easy Understanding
  • 2. Object-Oriented Programming (OOP) is a software development paradigm that suggests developers to split a program in building blocks known as objects. The OOP paradigm allows developers to define the object's data, functions, and its relationship with other objects.
  • 3. Code Reusability Enables to model real world object Easy Modification Easy Maintenance More Flexible
  • 4. Defines an Abstract thing of a thing (i.e. Object) Explaining its Behavior A user-defined data structure that groups properties and methods. Class doesn’t occupies memory. Class is a definition Abstract classes are classes that can have no instances
  • 5. A Single entity Which holds Data and Method. It’s Structure. Should be understandable by a non- Programmer DOG (Class) Color, Shape ( Characteristic ) Bark, Pee, Run ( Behaviors ) Members Abstract characteristics of a thing Fields - _Color Properties - Color Fields - _Color Properties - Color
  • 6. Specify Class Name Declare Data members Declare Methods Define the Processing
  • 7. Program them in the following order: Namespace: The namespace is a keyword that defines a distinctive name or last name for the class. A namespace categorizes and organizes the library (assembly) where the class belongs and avoids collisions with classes that share the same name. Class declaration: Line of code where the class name and type are defined. Fields: Set of variables declared in a class block.
  • 8. Constants: Set of constants declared in a class block. Constructors: A method or group of methods that contains code to initialize the class. Properties: The set of descriptive data of an object. Events: Program responses that get fired after a user or application action. Methods: Set of functions of the class.
  • 9. Destructor: A method that is called when the class is destroyed. In managed code, the Garbage Collector is in charge of destroying objects; however, in some cases developers need to take extra actions when objects are being released, such as freeing handles or de-allocating unmanaged objects. In .NET, there is no concept of deterministic destructors. The Garbage Collector will call the Finalize() method at a non-deterministic time while reclaiming memory for the application.
  • 10.  
  • 11. Access keywords Access keywords define the access to class members from the same class and from other classes. The most common access keywords are: Public: Allows access to the class member from any other class. Private: Allows access to the class member only in the same class. Protected: Allows access to the class member only within the same class and from inherited classes.
  • 12. Internal: Allows access to the class member only in the same assembly. Protected internal: Allows access to the class member only within the same class, from inherited classes, and other classes in the same assembly. Static: Indicates that the member can be called without first instantiating the class.
  • 13. A particular Instance of a Class Objects are the building blocks of OOP Represent real world things in an abstract way Commonly defined as variables or data structures that encapsulate behavior and data in a programmed unit The objects will all act as independent units in their own right, and they will be responsible for carrying out a certain process
  • 14. Object identity: Every object is unique and can be differentiated from other objects. Each time and object is created (instantiated) the object identity is defined. Object behavior: What the object can do. In OOP, methods work as functions that define the set of actions that the object can do. Objec t state: The data stored within the object at any given moment. In OOP, fields, constants, and properties define the state of an object.
  • 16. Is like inheriting the abstract characteristics from other class - It is a kind of hierarchy Base Class will be inherited to derived class is a way to form new classes using classes that have already been defined is-a relationships represent a hierarchy between classes of objects Use: Reuse of Code – uses the attributes of the base class Extensibility – Has it’s own Attributes
  • 17. Simple / Single Multilevel Hierarchical Multiple Hybrid
  • 18. Superclass: Parent class Subclass: Child class Base class: Parent class Derived class: Child class
  • 19. Is like inheriting from more than one base class. .Net do not allow. But using Multiple interface inheritance this can be achieved.
  • 20. Information Hiding Visibility to the methods and not to the fields E.g. A Report designer for a programmer Packs the data and Method and protects from external tampering Exposing only the details that are relevant: the public interface Improves Security
  • 21. Protected cName as string Protected Function ChangeName(NewName)     Me.cName = NewName End Function
  • 22. As we cannot hide entire object we give access to some specific part of data. Conceptual boundaries of an object Focuses on the essential characteristics of an object a named entity made up of selected attributes and behavior specific to a particular usage of the originating entity Improves Security For example see notes below
  • 23. One entity existing in multiple forms Behavior depends on the type of data Same message to diff objects results in different behavior Linked to inheritance and assures that derived class to override the implementation of parents methods.
  • 24. Class Employee     Function PayEmployee()        PayEmployee = Hours * HourlyRate     End Function Class CommissionedEmployee     Inherits Employee     Overrides Function PayEmployee()        PayEmployee = BasePay + Commissions     End Function
  • 25. Upcasting Casting an object of any type to another type which is above it in the inheritance hierarchy. Downcasting Casting an object of any type to another type which is below it in the inheritance hierarchy. Example Sealed Class When applied to a class, the sealed modifier prevents other classes from inheriting from it.
  • 26. static classes and static methods are used to create data and functions that can be accessed without creating an instance of the class. class CompanyInfo {     public string GetCompanyName() { return "CompanyName"; }     public string GetComAddress() { return "ComAddress"; }   These methods do not need to be attached to a specific instance of the class. Therefore, instead of creating unnecessary instances of this class, you can declare it as a static class, like this: static class CompanyInfo {   public static string GetCompanyName() {return "CompanyName";}   public static string GetComAddress() {return "ComAddress";}
  • 27. www.c-sharpcorner.com www.csharpcorner.com 2 www.kuro5hin.org www.informit.com www.forums.asp.net www.developerfusion.com www.msdn.microsoft.com