Object oriented programming
This presentation is the property of its rightful owner.
Sponsored Links
1 / 17

Object-Oriented Programming PowerPoint PPT Presentation


  • 74 Views
  • Uploaded on
  • Presentation posted in: General

Object-Oriented Programming. Agenda. Classes Attributes Properties Methods (Functions) Constructor Passing Parameters By Reference & Value Access Modifiers Interfaces Polymorphism Overriding. Classes. <access modifier> class class_name. Class Definition. Note: .

Download Presentation

Object-Oriented Programming

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Object oriented programming

Object-Oriented Programming


Agenda

Agenda

  • Classes

    • Attributes

    • Properties

    • Methods (Functions)

    • Constructor

    • Passing Parameters By Reference & Value

  • Access Modifiers

  • Interfaces

  • Polymorphism

  • Overriding


Classes

Classes


Access modifier class class name

<access modifier> class class_name

Class Definition

Note:

  • Access modifier specify the access rules for the members as well as the class itself, if not mentioned then the default access for the members is private.

  • To access the class members, you will use the dot (.) operator.

  • The dot operator links the name of an object with the name of a member.


Class features

Class Features:

  • Attributes<access modifier> <data type> variable1; <access modifier> <data type> variable2;

  • Properties<access modifier> <data type> prop_name { get{ } set{ } }

  • Methods<access modifier> <return type> method name(Parameter) { Method Body }

  • Constructor<access modifier> class name(Parameter)


Passing parameters by reference value

Passing Parameters By Reference & Value


Access modifiers

Access Modifiers


List of access modifiers

List of Access Modifiers:

  • Public

  • Private

  • Protected

  • Internal

  • Protected internal


Interfaces

Interfaces


Object oriented programming

  • An interface is defined as a syntactical contract that all the classes inheriting the interface should follow.

  • The interface defines the 'what' part of the syntactical contract and the deriving classes define the 'how' part of the syntactical contract.


Polymorphism

Polymorphism


Object oriented programming

  • Static Polymorphism:

    • Function overloading

    • Operator overloading

  • Dynamic Polymorphism


Overriding

Overriding


Summary

Summary:

  • Classes

  • Classes Features

  • Access Modifiers

  • Interfaces

  • Polymorphism


Contact me

Contact Me

[email protected]

@lilemam

01023513868

/lil.emam


  • Login