package com.guoyasoft.implement;
import java.util.List;
import org.testng.internal.junit.ArrayAsserts;
public class TestStudent {
public static void main(String[] args) {
IStudy wl1=new StudentWL();
IStudy wl2=new StudentCY();
List<IStudy> list=new ArrayList<IStudy>();
list.add(wl1);
list.add(wl2);
for(IStudy s:list){
s.doHomeWork("家庭作业");
s.learn("法语");
}
}
}
网友评论