2011年6月11日

【笔记】Eclipse and Java for Total Beginners—009

摘要: Lesson 09 – MyLibrary Class and ArrayListHow can we hold books, etc. in a collection?MyLibrary object to hold Person & Entry objectsIntroduce ArrayList in scrapbookIntroduce Java GenericsMethod chaining使用ArrayList前,要添加java.util. 1 ArrayList<Book> list = new ArrayList<Book>(); 2 3 Boo 阅读全文

posted @ 2011-06-11 21:07 yf.x 阅读(384) 评论(0) 推荐(0) 编辑

【笔记】Eclipse and Java for Total Beginners—008

摘要: Lesson 08 – Add Person to Book ClassCreate a relationship between the Book class and the Person classTest getPerson methodCreate JUnit Test Suite1. 本课的任务目前,已创建Person class 和 Book class。需要显示哪个人借了哪本书。要创建Book 和Person之间的关联。仍用test-first方法。2. 步骤 打开BookTest,添加method.创建testGetPerson() method.创建getPerson() m 阅读全文

posted @ 2011-06-11 13:40 yf.x 阅读(290) 评论(0) 推荐(0) 编辑

导航