class Book{
public String getContent(){
return "很久很久以前有一个阿拉伯的故事……"; }
}
class Newspaper{
public String getContent(){
return "林书豪38+7领导尼克斯击败湖人……";}
}
class Mother{
public void narrate(Newspaper newspaper){
System.out.println("妈妈开始讲故事");
System.out.println(Book.getContent());
System.out.println(Newspaper.getContent());
}
}
public class Client{
public static void main(String[] args){
Mother mother = new Mother();
mother.narrate(new Reader());
}
}
按照这个思路修改dai'ma