import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 模拟 * @author PC504 * */ public class Imitate { private Date date;//时间 private String adress;//地点 private Person person;//人物 public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getAdress() { return adress; } public void setAdress(String adress) { this.adress = adress; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } /** * 事故模拟现场开始 */ public void imitateStart(){ Imitate imitate = new Imitate(); Person hero = new Person("李启铭","单位实习生","河北省保定市河北大学"); Person studentA = new Person("陈某","学生","河北省保定市河北大学"); Person studentB = new Person("张某","学生","河北省保定市河北大学"); List<Person> personList = new ArrayList<Person>(); personList.add(studentA); personList.add(studentB); if(imitate.accidentIsflee(person, personList)){ System.out.println("逮捕"); }else{ System.out.println("天网恢恢。疏而不漏"); } } /**Mo * * @param person 肇事者 * @param personList 受害者 * @return */ public boolean accidentIsflee(Person person,List<Person> personList){ Car car = new Car(); car.accident(person, personList); //事故现场再现 Person publicSecurity = new Person("保安","治安","河北大学");//保安出现 person.say("我爸是李刚"); return publicSecurity.manage(person); //是否逃离 } }?