Skip to content

Commit 0e2322f

Browse files
authored
Merge pull request astaxie#795 from ZhenhangTung/master
fix interface implementation of student and employee
2 parents 3fcf783 + bf4ef1e commit 0e2322f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

en/02.6.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Let's do some more work. We'll add one more method `Sing()` to them, along with
1414

1515
Now, Student has three methods called `SayHi()`, `Sing()` and `BorrowMoney()`, and Employee has `SayHi()`, `Sing()` and `SpendSalary()`.
1616

17-
This combination of methods is called an interface and is implemented by both Student and Employee. So, Student and Employee implement the interface: `SayHi()` and `Sing()`. At the same time, Employee doesn't implement the interface: `SayHi()`, `Sing()`, `BorrowMoney()`, and Student doesn't implement the interface: `SayHi()`, `Sing()`, `SpendSalary()`. This is because Employee doesn't have the method `BorrowMoney()` and Student doesn't have the method `SpendSalary()`.
17+
This combination of methods is called an interface and is implemented by both Student and Employee. So, Student and Employee implement the interface: `SayHi()` and `Sing()`. At the same time, Employee doesn't implement the interface: `BorrowMoney()`, and Student doesn't implement the interface: `SpendSalary()`. This is because Employee doesn't have the method `BorrowMoney()` and Student doesn't have the method `SpendSalary()`.
1818

1919
### Type of Interface
2020

0 commit comments

Comments
 (0)