SlideShare a Scribd company logo
1 of 17
Download to read offline
CHAPTER 8
ABSTRACT & INTERFACE
Mr.Warawut Khangkhan
e-Mail: awarawut@hotmail.com
Social Media: www.facebook.com/AjWarawut
Mr.Warawut Khangkhan   Chapter 8 Thread
                       Chapter 8 Thread
                                          ABSTRACT
                                                     2
ABSTRACT CLASS




                                                   Mr.Warawut
                                                    Khangkhan
 ˈ         F F           ˈ
Abstract Method




                                                       Chapter 8 Thread
Abstract Method                    F           F
    F
        F    F             F           F
   F ˈ             F           F
       F F     F     F F                   F
      Overriding Method                            3
ABSTRACT CLASS




                                    Mr.Warawut
                                     Khangkhan
               Abstract Class F
               Abstract Method F




                                        Chapter 8 Thread
        F          F  F
Abstract Class          F
 F         F F   F        F     F
      F Implementation F F
          F Implementation F F
Concrete Method                     4
F ABSTRACT CLASS




                                     Mr.Warawut
                                      Khangkhan
  abstract
abstract class AbstractClassName {
     [AbstractMethodNames]
      AbstractMethodNames]




                                         Chapter 8 Thread
     [ConcreteMethodNames]
      ConcreteMethodNames]
}

AbstractMethodNames
     ˈ F           Abstract Method
         F     F F
       F   F F 1                     5
F   ABSTRACT CLASS




                                          Mr.Warawut
                                           Khangkhan
class ClassName extends AbstractClassName {
     AbstractMethodNames(
     AbstractMethodNames( ) {




                                             Chapter 8 Thread
          [Statements];
     }
}




                                         6
Mr.Warawut
             Chapter 8 Thread
 Khangkhan
                                7
Mr.Warawut Khangkhan   Chapter 8 Thread
                                 Thread
                                          INTERFACE
                                                      8
INTERFACE




                                       Mr.Warawut
                                        Khangkhan
     ˈ             ˈ Abstract Method
               F     F F F        F




                                           Chapter 8 Thread
 F       ˈ F




                                       9
F INTERFACE




                                        Mr.Warawut
                                         Khangkhan
  abstract
[modifier] interface InterfaceName {




                                          Chapter 8 Thread
}

Interface         F Abstract Method
 F        Abtract Class F
implements          F  F          F
         F Abstract Method F        F
     F F                                10
F   INTERFACE




                                        Mr.Warawut
                                         Khangkhan
[modifier] class ClassName implements
InterfaceName {




                                          Chapter 8 Thread
      AbstractMethodNames(
      AbstractMethodNames( ) {
           [Statements];
      }
}

           Example Ch08_02.java

                                        11
F       F    F ABSTRACT CLASS
      INTERFACE




                                    Mr.Warawut
                                     Khangkhan
    Abstract Class ˈ          F
    2                   (Concrete




                                      Chapter 8 Thread
    Method)         F
    (Abstract Method)    Abstract
    Class F
                  F

                                    12
F        F    F ABSTRACT CLASS
      INTERFACE




                                       Mr.Warawut
                                        Khangkhan
    Interface ˈ        F
      Interface F            F




                                         Chapter 8 Thread
         F       Interface F
       F ˈ      Implements Interface




                                       13
F        F       F ABSTRACT CLASS
      INTERFACE




                                    Mr.Warawut
                                     Khangkhan
                 Abstract Class F
             F




                                      Chapter 8 Thread
            F Interface F      F
    Interface    F Interface F
    Multiple Inheritance F


                                    14
Mr.Warawut Khangkhan   Chapter 8 Thread
                                 Thread
                                          MULTIPLE INHERITANCE
                                                                 15
MULTIPLE INHERITANCE




                               Mr.Warawut
                                Khangkhan
                  SuperClass
           F  F SubClass




                                 Chapter 8 Thread
    F     Amphibian
      Car
Boat
   Amphibian
        F
      2                        16
F       F   MULIPLE
INTERFACE




                                        Mr.Warawut
                                         Khangkhan
   abstract
[modifier] class ClassName implements
InterfaceName_1 InterfaceName_2
InterfaceName_1, InterfaceName_2, …,




                                          Chapter 8 Thread
InterfaceName_n {

}




                                        17

More Related Content

More from Warawut

Database design
Database designDatabase design
Database designWarawut
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4Warawut
 
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
 
Object-Oriented Programming 4
Object-Oriented Programming 4Object-Oriented Programming 4
Object-Oriented Programming 4Warawut
 
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
 
Upload File
Upload FileUpload File
Upload FileWarawut
 
Session and Cookie
Session and CookieSession and Cookie
Session and CookieWarawut
 
Form Validation
Form ValidationForm Validation
Form ValidationWarawut
 

More from Warawut (20)

Database design
Database designDatabase design
Database design
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4
 
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
 
Object-Oriented Programming 4
Object-Oriented Programming 4Object-Oriented Programming 4
Object-Oriented Programming 4
 
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
 
Upload File
Upload FileUpload File
Upload File
 
Login
LoginLogin
Login
 
Session and Cookie
Session and CookieSession and Cookie
Session and Cookie
 
Form Validation
Form ValidationForm Validation
Form Validation
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
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
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
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"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Object-Oriented Programming 8

  • 1. CHAPTER 8 ABSTRACT & INTERFACE Mr.Warawut Khangkhan e-Mail: awarawut@hotmail.com Social Media: www.facebook.com/AjWarawut
  • 2. Mr.Warawut Khangkhan Chapter 8 Thread Chapter 8 Thread ABSTRACT 2
  • 3. ABSTRACT CLASS Mr.Warawut Khangkhan ˈ F F ˈ Abstract Method Chapter 8 Thread Abstract Method F F F F F F F F ˈ F F F F F F F F Overriding Method 3
  • 4. ABSTRACT CLASS Mr.Warawut Khangkhan Abstract Class F Abstract Method F Chapter 8 Thread F F F Abstract Class F F F F F F F F Implementation F F F Implementation F F Concrete Method 4
  • 5. F ABSTRACT CLASS Mr.Warawut Khangkhan abstract abstract class AbstractClassName { [AbstractMethodNames] AbstractMethodNames] Chapter 8 Thread [ConcreteMethodNames] ConcreteMethodNames] } AbstractMethodNames ˈ F Abstract Method F F F F F F 1 5
  • 6. F ABSTRACT CLASS Mr.Warawut Khangkhan class ClassName extends AbstractClassName { AbstractMethodNames( AbstractMethodNames( ) { Chapter 8 Thread [Statements]; } } 6
  • 7. Mr.Warawut Chapter 8 Thread Khangkhan 7
  • 8. Mr.Warawut Khangkhan Chapter 8 Thread Thread INTERFACE 8
  • 9. INTERFACE Mr.Warawut Khangkhan ˈ ˈ Abstract Method F F F F F Chapter 8 Thread F ˈ F 9
  • 10. F INTERFACE Mr.Warawut Khangkhan abstract [modifier] interface InterfaceName { Chapter 8 Thread } Interface F Abstract Method F Abtract Class F implements F F F F Abstract Method F F F F 10
  • 11. F INTERFACE Mr.Warawut Khangkhan [modifier] class ClassName implements InterfaceName { Chapter 8 Thread AbstractMethodNames( AbstractMethodNames( ) { [Statements]; } } Example Ch08_02.java 11
  • 12. F F F ABSTRACT CLASS INTERFACE Mr.Warawut Khangkhan Abstract Class ˈ F 2 (Concrete Chapter 8 Thread Method) F (Abstract Method) Abstract Class F F 12
  • 13. F F F ABSTRACT CLASS INTERFACE Mr.Warawut Khangkhan Interface ˈ F Interface F F Chapter 8 Thread F Interface F F ˈ Implements Interface 13
  • 14. F F F ABSTRACT CLASS INTERFACE Mr.Warawut Khangkhan Abstract Class F F Chapter 8 Thread F Interface F F Interface F Interface F Multiple Inheritance F 14
  • 15. Mr.Warawut Khangkhan Chapter 8 Thread Thread MULTIPLE INHERITANCE 15
  • 16. MULTIPLE INHERITANCE Mr.Warawut Khangkhan SuperClass F F SubClass Chapter 8 Thread F Amphibian Car Boat Amphibian F 2 16
  • 17. F F MULIPLE INTERFACE Mr.Warawut Khangkhan abstract [modifier] class ClassName implements InterfaceName_1 InterfaceName_2 InterfaceName_1, InterfaceName_2, …, Chapter 8 Thread InterfaceName_n { } 17