SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
CHAPTER 4
OBJECTS & CLASSES
Mr.Warawut Khangkhan
e-Mail: awarawut@hotmail.com
Social Media: www.facebook.com/AjWarawut
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           2
F             F
      F




                                              Mr.Warawut
                                               Khangkhan
              F




                                                  Chapter 4 Objects & Classes
Top-Down                    Bottom-Up
 F                              F    ˈ
 FF F                        F         F
                            (Information
                            Hiding)
  F               ˆ F          F F F
                                              3
                            (Encapsulation)
OBJECTS & CLASSES




                                                  Mr.Warawut
                                                   Khangkhan
Class                F
object       F           F           F




                                                      Chapter 4 Objects & Classes
Object           F           F
                                 F       ,   ,F
         F


                                                  4
Mr.Warawut
                                 Chapter 4 Objects & Classes
               Khangkhan
                                                               5
                           Class name
OBJECTS & CLASSES

                                        Attribute

                                                    Method
Mr.Warawut
                           Chapter 4 Objects & Classes
               Khangkhan
                                                         6
OBJECTS & CLASSES
OOP




                                                                   Mr.Warawut
                                                                    Khangkhan
Abstraction –    ˈ                 F       F F                 F
class                     ˈ    F                 F         F




                                                                       Chapter 4 Objects & Classes
    F F   F   attribute   method
Encapsulation – ˈ             F F                    F     F F
  F   F       class
Inheritance – ˈ               F class
    attribute method           class                 F F
class
Polymorphism –        ˈ                F
                                                                   7
class F
Mr.Warawut Khangkhan   Chapter 4 Objects & Classes
                                 Objects & Classes
                                          F CLASS
                                                     8
Mr.Warawut
                   Chapter 4 Objects & Classes
       Khangkhan
                                                 9
F CLASS

                   attribute
                               method
           class
CLASS




                                 Mr.Warawut
                                  Khangkhan
[ modifier ] class className {
   [ attributeName ]




                                   Chapter 4 Objects & Classes
   [ methodName ]
}

public class Student {
  …
}
                                 10
ATTRIBUTE




                                        Mr.Warawut
                                         Khangkhan
[ modifier ] dataType attributeName ;




                                          Chapter 4 Objects & Classes
public class Student {
  String name;
  int age;
}


                                        11
METHOD




                                     Mr.Warawut
                                      Khangkhan
[ modifier ] returnType methodName
([parameter]) {




                                       Chapter 4 Objects & Classes
   [ method_body ]
          varValue;
   return varValue;
};



                                     12
METHOD




                                             Mr.Warawut
                                              Khangkhan
public class Student {
  String name;




                                               Chapter 4 Objects & Classes
  int age;

    public void setData( ) {
                setData(
               “Warawut
                 Warawut”;
      name = “Warawut”;
             50;
      age = 50;
    }

                getData(
    public void getData( ) {
      System.out.println(“Name:
      System.out.println(“Name: ” + name);
      System.out.println(“Age:
      System.out.println(“Age: ” + age);
    }
}                                            13
Mr.Warawut Khangkhan   Chapter 4 Objects & Classes
                                 Objects & Classes
                                          CLASS
                                           F
                                                     14
OBJECT




                                      Mr.Warawut
                                       Khangkhan
[ modifier ] className objectName;
                       objectName;




                                        Chapter 4 Objects & Classes
 F object
objectName = new className( );
                 className(
            F object F
[ modifier ] className objectName =
     className(
new className( );
                                      15
F               CLASS




                                       Mr.Warawut
                                        Khangkhan
objectName.attributeName;
objectName.attributeName;




                                         Chapter 4 Objects & Classes
    method F          F
objectName.methodName( [argument] );
objectName.methodName(

    method        F
dataType methodValue =
objectName.methodName(
objectName.methodName( [argument] );
                                       16
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           17
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           18
Mr.Warawut Khangkhan   Chapter 4 Objects & Classes
                       Chapter 4 Objects & Classes
                              MODIFIER
                              JAVA
                                                     19
Mr.Warawut
                    Chapter 4 Objects & Classes
        Khangkhan
                                                  20
JAVA
MODIFIER
MODIFIER              JAVA




                             Mr.Warawut
                              Khangkhan
Non Access Modifier
Access Modifier




                               Chapter 4 Objects & Classes
                             21
NON ACCESS MODIFIER




                                           Mr.Warawut
                                            Khangkhan
  key word F                         F F
   F F    class F




                                             Chapter 4 Objects & Classes
 static F ˈ key word            F
 attribute    method     ˈ     static
 modifier
 final F ˈ key word             F
 attribute    class  ˈ       final
 modifier
                                           22
NON ACCESS MODIFIER -
STATIC




                                                     Mr.Warawut
                                                      Khangkhan
 attribute         ˈ static
     F




                                                       Chapter 4 Objects & Classes
         F F               F          object
 method          ˈ static
         F      F              F           class
       F       class   F           class F   F F F
  object
                                                     23
NON ACCESS MODIFIER -
FINAL




                                     Mr.Warawut
                                      Khangkhan
 attribute       F             F F




                                       Chapter 4 Objects & Classes
 class       F       F class
         F




                                     24
ACCESS MODIFIER




                                        Mr.Warawut
                                         Khangkhan
  key word   F             F F      ˈ
                     F F   class




                                          Chapter 4 Objects & Classes
                 ˂            F
    class             F         class
  F    F


                                        25
ACCESS MODIFIER




                                                         Mr.Warawut
                                                          Khangkhan
 F         Access Modifier ˈ 4




                                                           Chapter 4 Objects & Classes
     public         F F          F           class
     private         F F             F          class
          F
     protected             F F           F       class
            class
     package             F F          F     class
            class    F               package             26
Mr.Warawut Khangkhan   Chapter 4 Objects & Classes
                                 Objects & Classes
                                             PRIVATE
                               F
                                                       27
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           28
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           29
Mr.Warawut Khangkhan   Chapter 4 Objects & Classes
                                 Objects & Classes
                                             PROTECTED
                               F
                                                         30
Mr.Warawut
             Chapter 4 Objects & Classes
 Khangkhan
                                           31

Contenu connexe

Plus de Warawut

Database design
Database designDatabase design
Database designWarawut
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4Warawut
 
Object-Oriented Programming 10
Object-Oriented Programming 10Object-Oriented Programming 10
Object-Oriented Programming 10Warawut
 
Object-Oriented Programming 9
Object-Oriented Programming 9Object-Oriented Programming 9
Object-Oriented Programming 9Warawut
 
Object-Oriented Programming 8
Object-Oriented Programming 8Object-Oriented Programming 8
Object-Oriented Programming 8Warawut
 
Object-Oriented Programming 7
Object-Oriented Programming 7Object-Oriented Programming 7
Object-Oriented Programming 7Warawut
 
Object-Oriented Programming 6
Object-Oriented Programming 6Object-Oriented Programming 6
Object-Oriented Programming 6Warawut
 
Management Information System 6
Management Information System 6Management Information System 6
Management Information System 6Warawut
 
Management Information System 5
Management Information System 5Management Information System 5
Management Information System 5Warawut
 
Management Information System 4
Management Information System 4Management Information System 4
Management Information System 4Warawut
 
Object-Oriented Programming 5
Object-Oriented Programming 5Object-Oriented Programming 5
Object-Oriented Programming 5Warawut
 
Business Computer Project 3
Business Computer Project 3Business Computer Project 3
Business Computer Project 3Warawut
 
Management Information System 3
Management Information System 3Management Information System 3
Management Information System 3Warawut
 
Business Computer Project 2
Business Computer Project 2Business Computer Project 2
Business Computer Project 2Warawut
 
Chapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemChapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemWarawut
 
Business Computer Project 1
Business Computer Project 1Business Computer Project 1
Business Computer Project 1Warawut
 
Chapter 1 Organization & MIS
Chapter 1 Organization & MISChapter 1 Organization & MIS
Chapter 1 Organization & MISWarawut
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3Warawut
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2Warawut
 
Object-Oriented Programming 1
Object-Oriented Programming 1Object-Oriented Programming 1
Object-Oriented Programming 1Warawut
 

Plus de Warawut (20)

Database design
Database designDatabase design
Database design
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4
 
Object-Oriented Programming 10
Object-Oriented Programming 10Object-Oriented Programming 10
Object-Oriented Programming 10
 
Object-Oriented Programming 9
Object-Oriented Programming 9Object-Oriented Programming 9
Object-Oriented Programming 9
 
Object-Oriented Programming 8
Object-Oriented Programming 8Object-Oriented Programming 8
Object-Oriented Programming 8
 
Object-Oriented Programming 7
Object-Oriented Programming 7Object-Oriented Programming 7
Object-Oriented Programming 7
 
Object-Oriented Programming 6
Object-Oriented Programming 6Object-Oriented Programming 6
Object-Oriented Programming 6
 
Management Information System 6
Management Information System 6Management Information System 6
Management Information System 6
 
Management Information System 5
Management Information System 5Management Information System 5
Management Information System 5
 
Management Information System 4
Management Information System 4Management Information System 4
Management Information System 4
 
Object-Oriented Programming 5
Object-Oriented Programming 5Object-Oriented Programming 5
Object-Oriented Programming 5
 
Business Computer Project 3
Business Computer Project 3Business Computer Project 3
Business Computer Project 3
 
Management Information System 3
Management Information System 3Management Information System 3
Management Information System 3
 
Business Computer Project 2
Business Computer Project 2Business Computer Project 2
Business Computer Project 2
 
Chapter 2 Strategy & Information System
Chapter 2 Strategy & Information SystemChapter 2 Strategy & Information System
Chapter 2 Strategy & Information System
 
Business Computer Project 1
Business Computer Project 1Business Computer Project 1
Business Computer Project 1
 
Chapter 1 Organization & MIS
Chapter 1 Organization & MISChapter 1 Organization & MIS
Chapter 1 Organization & MIS
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2
 
Object-Oriented Programming 1
Object-Oriented Programming 1Object-Oriented Programming 1
Object-Oriented Programming 1
 

Dernier

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Dernier (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Object-Oriented Programming 4

  • 1. CHAPTER 4 OBJECTS & CLASSES Mr.Warawut Khangkhan e-Mail: awarawut@hotmail.com Social Media: www.facebook.com/AjWarawut
  • 2. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 2
  • 3. F F F Mr.Warawut Khangkhan F Chapter 4 Objects & Classes Top-Down Bottom-Up F F ˈ FF F F F (Information Hiding) F ˆ F F F F 3 (Encapsulation)
  • 4. OBJECTS & CLASSES Mr.Warawut Khangkhan Class F object F F F Chapter 4 Objects & Classes Object F F F , ,F F 4
  • 5. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 5 Class name OBJECTS & CLASSES Attribute Method
  • 6. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 6 OBJECTS & CLASSES
  • 7. OOP Mr.Warawut Khangkhan Abstraction – ˈ F F F F class ˈ F F F Chapter 4 Objects & Classes F F F attribute method Encapsulation – ˈ F F F F F F F class Inheritance – ˈ F class attribute method class F F class Polymorphism – ˈ F 7 class F
  • 8. Mr.Warawut Khangkhan Chapter 4 Objects & Classes Objects & Classes F CLASS 8
  • 9. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 9 F CLASS attribute method class
  • 10. CLASS Mr.Warawut Khangkhan [ modifier ] class className { [ attributeName ] Chapter 4 Objects & Classes [ methodName ] } public class Student { … } 10
  • 11. ATTRIBUTE Mr.Warawut Khangkhan [ modifier ] dataType attributeName ; Chapter 4 Objects & Classes public class Student { String name; int age; } 11
  • 12. METHOD Mr.Warawut Khangkhan [ modifier ] returnType methodName ([parameter]) { Chapter 4 Objects & Classes [ method_body ] varValue; return varValue; }; 12
  • 13. METHOD Mr.Warawut Khangkhan public class Student { String name; Chapter 4 Objects & Classes int age; public void setData( ) { setData( “Warawut Warawut”; name = “Warawut”; 50; age = 50; } getData( public void getData( ) { System.out.println(“Name: System.out.println(“Name: ” + name); System.out.println(“Age: System.out.println(“Age: ” + age); } } 13
  • 14. Mr.Warawut Khangkhan Chapter 4 Objects & Classes Objects & Classes CLASS F 14
  • 15. OBJECT Mr.Warawut Khangkhan [ modifier ] className objectName; objectName; Chapter 4 Objects & Classes F object objectName = new className( ); className( F object F [ modifier ] className objectName = className( new className( ); 15
  • 16. F CLASS Mr.Warawut Khangkhan objectName.attributeName; objectName.attributeName; Chapter 4 Objects & Classes method F F objectName.methodName( [argument] ); objectName.methodName( method F dataType methodValue = objectName.methodName( objectName.methodName( [argument] ); 16
  • 17. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 17
  • 18. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 18
  • 19. Mr.Warawut Khangkhan Chapter 4 Objects & Classes Chapter 4 Objects & Classes MODIFIER JAVA 19
  • 20. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 20 JAVA MODIFIER
  • 21. MODIFIER JAVA Mr.Warawut Khangkhan Non Access Modifier Access Modifier Chapter 4 Objects & Classes 21
  • 22. NON ACCESS MODIFIER Mr.Warawut Khangkhan key word F F F F F class F Chapter 4 Objects & Classes static F ˈ key word F attribute method ˈ static modifier final F ˈ key word F attribute class ˈ final modifier 22
  • 23. NON ACCESS MODIFIER - STATIC Mr.Warawut Khangkhan attribute ˈ static F Chapter 4 Objects & Classes F F F object method ˈ static F F F class F class F class F F F F object 23
  • 24. NON ACCESS MODIFIER - FINAL Mr.Warawut Khangkhan attribute F F F Chapter 4 Objects & Classes class F F class F 24
  • 25. ACCESS MODIFIER Mr.Warawut Khangkhan key word F F F ˈ F F class Chapter 4 Objects & Classes ˂ F class F class F F 25
  • 26. ACCESS MODIFIER Mr.Warawut Khangkhan F Access Modifier ˈ 4 Chapter 4 Objects & Classes public F F F class private F F F class F protected F F F class class package F F F class class F package 26
  • 27. Mr.Warawut Khangkhan Chapter 4 Objects & Classes Objects & Classes PRIVATE F 27
  • 28. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 28
  • 29. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 29
  • 30. Mr.Warawut Khangkhan Chapter 4 Objects & Classes Objects & Classes PROTECTED F 30
  • 31. Mr.Warawut Chapter 4 Objects & Classes Khangkhan 31