SlideShare a Scribd company logo
UNIVERSITY COLLEGE OF
COMPUTER
APPLICATIONS
WELCOME YOU ALL
INTERFACES
JAVA INTERFACE
3
◉ A J ava interface is a collection of constants and
abstract methods
◼ abstract method: a method header without a method
body; we declare an abstract method using the
modifier a b s t ra c t
◼ since all methods in an interface are abstract, the
a b s t ra c t modifier is usually left off
◉ Methods in an interface have public visibility by
default
INTERFACE: SYNTAX
interfaceisa reserved word
public interface Doable
{
public static f i n a l String NAME;
public void
doThis();
public i n t doThat();
public void doThis2 ( f l o a t value, char ch);
public boolean doTheOther ( i n t num);
}
A semicolon immediately
followseach method
header
No method in an
interfacehas a definition
4
IMPLEMENTING AN INTERFACE
5
◉ A class formally implements an interface by
◼ stating so in the class header in the implements
clause
◼ a class can implement multiple interfaces: the
interfaces are listed in the implements clause,
separated by commas
◉ If a class asserts that it implements an interface, it
must define all methods in the interface or the
compiler will produce errors
IMPLEMENTING INTERFACES
public class Something implements
Doable
{
public void doThis ( )
{
//
whateve
r
}
public void doThat ( )
{
// whatever
}
implements is
a reserved
word
Each method
listed
in Doable
is
given a
definition
// etc.
}
public c l a s s ManyThings implements Doable,
AnotherDoable 6
INTERFACES: AN EXAMPLE
7
◉ A class that implements an interface can
implement other methods as well
UML DIAGRAM
<<interface>>
Complexity
+ getComplexity () : int
+ setComplexity (int) : void
Question
+ getQuestion () : String
+ getAnswer () : String
+ answerCorrect (String) : boolean
+ toString() : String
MiniQuiz
+ main(args : String[]) : void
1
8
2
INTERFACES: EXAMPLES FROM
JAVA STANDARD CLASS LIBRARY
9
◉ The Java Standard Class library defines many
interfaces:
◼ the I t e r a t o r interface contains methods that
allow the user to move through a collection of
objects easily
□ h a sN ex t (), n e x t ( ) , remove()
◼ the Comparable interface contains an abstract
method called compareTo, which is used to compare
two objects
i f (obj1.compareTo(obj2) < 0)
Syste m . o u t . pr i n t l n (“ o b j 1 i s l e s s than
o b j 2 ” ) ;
POLYMORPHISM VIA INTERFACES
10
◉ Define a polymorphism reference through
interface
◼ declare a reference variable of an interface type
Doable o b j ;
◼ the obj reference can be used to point to any object
of any class that implements the Doable interface
◼ the version of doThis depends on the type of
object that obj is referring to:
o b j . d o T h i s ( ) ;
EXAMPLE: POLYMORPHISM VIA
INTERFACE
11
◉ The payroll program revisited: we want to
sort the employees by name
MORE EXAMPLES
p u b l ic i n t e r f a c e Speaker
{
p u b l ic void sp e a k( ) ;
}
c l a s s Philosopher extends Human
implements Speaker
{
//
p u b l ic void speak()
{…}
p u b l ic void p o n t i f i c a t e ( )
{…}
}
c l a s s Dog extends Animal
implements Speaker
{
//
p u b l ic void speak()
{
…
}
Speaker g u e s t ;
guest = new Ph i l o sop he r( );
g u e s t . s p e a k ( ) ;
guest = Dog();
g u e s t . s p e a k ( ) ;
11
Speaker s p e c i a l ;
s p e c i a l = new Ph i l o so phe r( ) ;
s p e c i a l . p o n t i f i c a t e ( ) ; /
/compilererror
Speaker s p e c i a l ;
s p e c i a l = new Ph i l o so phe r( ) ;
( ( P h i l o s o p h e r ) s p e c i a l ) . p o n t i f i c a t e ( ) ;
INTERFACE HIERARCHIES
◉ Inheritance can be applied to interfaces as well
as classes
◉ One interface can be used as the parent of
another
◉ The child interface inherits all abstract methods
of the parent
◉ A class implementing the child interface must
define all methods from both the parent and
child interfaces
◉ Note that class hierarchies and interface
hierarchies are distinct (they do not overlap)
12

More Related Content

Similar to Interface.pptx

Interface
InterfaceInterface
Interfacevvpadhu
 
java150929145120-lva1-app6892 (2).pptx
java150929145120-lva1-app6892 (2).pptxjava150929145120-lva1-app6892 (2).pptx
java150929145120-lva1-app6892 (2).pptxBruceLee275640
 
pbo 5 ervan
pbo 5 ervanpbo 5 ervan
pbo 5 ervanaris
 
12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.ppt12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.pptVISHNUSHANKARSINGH3
 
Visula C# Programming Lecture 8
Visula C# Programming Lecture 8Visula C# Programming Lecture 8
Visula C# Programming Lecture 8Abou Bakr Ashraf
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarPRAVIN GHOLKAR
 
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxOOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxssuser84e52e
 
Interface in java ,multiple inheritance in java, interface implementation
Interface in java ,multiple inheritance in java, interface implementationInterface in java ,multiple inheritance in java, interface implementation
Interface in java ,multiple inheritance in java, interface implementationHoneyChintal
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler DevelopmentLogan Chien
 
Exception handling and packages.pdf
Exception handling and packages.pdfException handling and packages.pdf
Exception handling and packages.pdfKp Sharma
 
javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892SRINIVAS C
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)ssuser7f90ae
 

Similar to Interface.pptx (20)

Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Interface
InterfaceInterface
Interface
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
java150929145120-lva1-app6892 (2).pptx
java150929145120-lva1-app6892 (2).pptxjava150929145120-lva1-app6892 (2).pptx
java150929145120-lva1-app6892 (2).pptx
 
pbo 5 ervan
pbo 5 ervanpbo 5 ervan
pbo 5 ervan
 
Interface
InterfaceInterface
Interface
 
12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.ppt12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.ppt
 
Visula C# Programming Lecture 8
Visula C# Programming Lecture 8Visula C# Programming Lecture 8
Visula C# Programming Lecture 8
 
javainterface
javainterfacejavainterface
javainterface
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. Gholkar
 
Java interface
Java interfaceJava interface
Java interface
 
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxOOFeatures_revised-2.pptx
OOFeatures_revised-2.pptx
 
Interface in java ,multiple inheritance in java, interface implementation
Interface in java ,multiple inheritance in java, interface implementationInterface in java ,multiple inheritance in java, interface implementation
Interface in java ,multiple inheritance in java, interface implementation
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler Development
 
Interface
InterfaceInterface
Interface
 
Overloading
OverloadingOverloading
Overloading
 
Exception handling and packages.pdf
Exception handling and packages.pdfException handling and packages.pdf
Exception handling and packages.pdf
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892javase8bestpractices-151015135520-lva1-app6892
javase8bestpractices-151015135520-lva1-app6892
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)
 

More from sukhpreetsingh295239 (14)

java poly ppt.pptx
java poly ppt.pptxjava poly ppt.pptx
java poly ppt.pptx
 
English Communication skills.ppt
English Communication skills.pptEnglish Communication skills.ppt
English Communication skills.ppt
 
CLOUD SECURITY.pptx
CLOUD SECURITY.pptxCLOUD SECURITY.pptx
CLOUD SECURITY.pptx
 
CCSK.pptx
CCSK.pptxCCSK.pptx
CCSK.pptx
 
MEMORY.pptx
MEMORY.pptxMEMORY.pptx
MEMORY.pptx
 
mms ppt 1.ppt
mms ppt 1.pptmms ppt 1.ppt
mms ppt 1.ppt
 
MMS PPT 2.pptx
MMS PPT 2.pptxMMS PPT 2.pptx
MMS PPT 2.pptx
 
Nfs ppt.ppt
Nfs ppt.pptNfs ppt.ppt
Nfs ppt.ppt
 
Cloud Storage Infrastructure updated.pptx
Cloud Storage Infrastructure updated.pptxCloud Storage Infrastructure updated.pptx
Cloud Storage Infrastructure updated.pptx
 
Data Center Advanced.pptx
Data Center Advanced.pptxData Center Advanced.pptx
Data Center Advanced.pptx
 
PPT (2).ppt
PPT (2).pptPPT (2).ppt
PPT (2).ppt
 
INTRODUCTION_O1.pptx
INTRODUCTION_O1.pptxINTRODUCTION_O1.pptx
INTRODUCTION_O1.pptx
 
Updated_Mathematics .pptx
Updated_Mathematics .pptxUpdated_Mathematics .pptx
Updated_Mathematics .pptx
 
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
 

Recently uploaded

Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxRaedMohamed3
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfVivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativePeter Windle
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxssuserbdd3e8
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasGeoBlogs
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfTamralipta Mahavidyalaya
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxJisc
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfkaushalkr1407
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 

Recently uploaded (20)

Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

Interface.pptx

  • 3. JAVA INTERFACE 3 ◉ A J ava interface is a collection of constants and abstract methods ◼ abstract method: a method header without a method body; we declare an abstract method using the modifier a b s t ra c t ◼ since all methods in an interface are abstract, the a b s t ra c t modifier is usually left off ◉ Methods in an interface have public visibility by default
  • 4. INTERFACE: SYNTAX interfaceisa reserved word public interface Doable { public static f i n a l String NAME; public void doThis(); public i n t doThat(); public void doThis2 ( f l o a t value, char ch); public boolean doTheOther ( i n t num); } A semicolon immediately followseach method header No method in an interfacehas a definition 4
  • 5. IMPLEMENTING AN INTERFACE 5 ◉ A class formally implements an interface by ◼ stating so in the class header in the implements clause ◼ a class can implement multiple interfaces: the interfaces are listed in the implements clause, separated by commas ◉ If a class asserts that it implements an interface, it must define all methods in the interface or the compiler will produce errors
  • 6. IMPLEMENTING INTERFACES public class Something implements Doable { public void doThis ( ) { // whateve r } public void doThat ( ) { // whatever } implements is a reserved word Each method listed in Doable is given a definition // etc. } public c l a s s ManyThings implements Doable, AnotherDoable 6
  • 7. INTERFACES: AN EXAMPLE 7 ◉ A class that implements an interface can implement other methods as well
  • 8. UML DIAGRAM <<interface>> Complexity + getComplexity () : int + setComplexity (int) : void Question + getQuestion () : String + getAnswer () : String + answerCorrect (String) : boolean + toString() : String MiniQuiz + main(args : String[]) : void 1 8 2
  • 9. INTERFACES: EXAMPLES FROM JAVA STANDARD CLASS LIBRARY 9 ◉ The Java Standard Class library defines many interfaces: ◼ the I t e r a t o r interface contains methods that allow the user to move through a collection of objects easily □ h a sN ex t (), n e x t ( ) , remove() ◼ the Comparable interface contains an abstract method called compareTo, which is used to compare two objects i f (obj1.compareTo(obj2) < 0) Syste m . o u t . pr i n t l n (“ o b j 1 i s l e s s than o b j 2 ” ) ;
  • 10. POLYMORPHISM VIA INTERFACES 10 ◉ Define a polymorphism reference through interface ◼ declare a reference variable of an interface type Doable o b j ; ◼ the obj reference can be used to point to any object of any class that implements the Doable interface ◼ the version of doThis depends on the type of object that obj is referring to: o b j . d o T h i s ( ) ;
  • 11. EXAMPLE: POLYMORPHISM VIA INTERFACE 11 ◉ The payroll program revisited: we want to sort the employees by name
  • 12. MORE EXAMPLES p u b l ic i n t e r f a c e Speaker { p u b l ic void sp e a k( ) ; } c l a s s Philosopher extends Human implements Speaker { // p u b l ic void speak() {…} p u b l ic void p o n t i f i c a t e ( ) {…} } c l a s s Dog extends Animal implements Speaker { // p u b l ic void speak() { … } Speaker g u e s t ; guest = new Ph i l o sop he r( ); g u e s t . s p e a k ( ) ; guest = Dog(); g u e s t . s p e a k ( ) ; 11 Speaker s p e c i a l ; s p e c i a l = new Ph i l o so phe r( ) ; s p e c i a l . p o n t i f i c a t e ( ) ; / /compilererror Speaker s p e c i a l ; s p e c i a l = new Ph i l o so phe r( ) ; ( ( P h i l o s o p h e r ) s p e c i a l ) . p o n t i f i c a t e ( ) ;
  • 13. INTERFACE HIERARCHIES ◉ Inheritance can be applied to interfaces as well as classes ◉ One interface can be used as the parent of another ◉ The child interface inherits all abstract methods of the parent ◉ A class implementing the child interface must define all methods from both the parent and child interfaces ◉ Note that class hierarchies and interface hierarchies are distinct (they do not overlap) 12