- 5
Fill in the blanks to define the Guitarist class that implements the MusicianInterface. Call the play() method on the Guitarist
tell me ans
5 Answers
+ 5
interface MusicianInterface {
public function play();
}
class Guitarist
implements
MusicianInterface {
public function play() {
echo "La La La";
}
}
$obj = new Guitarist();
$obj->play();
0
interface
implements
play()
0
Correct ans:
interface
implements
play()
Final Code:---
interface MusicianInterface {
public function play();
}
class Guitarist
implements
MusicianInterface {
public function play() {
echo "La La La";
}
}
$obj = new Guitarist();
$obj->play();
- 1
If this was about a lesson; review the chapter, read comments in lesson. If that didn't help then post a question in Q&A, including information about which lesson, chapter and which quiz, as well as specifying the language in question tags
Please follow this guide for posting a question in the future đ
https://www.sololearn.com/Discuss/333866/?ref=app
- 1
interface
implements
play()