Class1

359 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
359
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Class1

  1. 1. • (Object-Oriented Programming Language : OOPL) ObjectOriented Programming) OOP
  2. 2. • program OOP - object object request) object operation) - Program object message) message request function object - Object object object object - Object type/class) - Object type
  3. 3. Object 2 dataObject 1 data Object 4 data Object 3 data Object Message Object
  4. 4. Class object classobject data method template) Object) Object Object Attribute) Object Behavior) Object Object
  5. 5. Object1. identity Object Object identity Attribute (Variable) State Object Object Message State Attribute (Value of Attribute) Behavior Object Object Message Behavior Method
  6. 6. run-time objectobject object class source codeEncapsulation - methods propertiesInheritance - subclass)Abstraction -objectPolymorphism - method
  7. 7. Encapsulation) private public get/setdata class Full Encapsulationclass
  8. 8. Inheritance) Class ClassClass- Class Subclasses- Class Superclass Reusable)Class Superclass Class Single Inheritance) extends
  9. 9. Polymorphism)- Overridden method Dynamic Binding OOP Object class main>> object x>> class object class x { public static void main(String args[]) { System.out.println("x"); } }
  10. 10. object class class object>> object object 1 object 2 class x { public static void main(String args[]) { int i = 1; System.out.println(i); ok(); } static void ok() { System.out.println("xx"); } }// Result of this program// 1// xx

×