This website works better with JavaScript.
首頁
探索
說明
登入
binhong
/
LibrarySystem
關註
1
收藏
0
複製
0
程式碼
問題管理
0
合併請求
0
版本發佈
0
Wiki
Activity
瀏覽代碼
Implementation of BookFactory class
BookFactory is now implemented to handle all the books.
master
BinHong Lee
8 年之前
父節點
da8ddfb495
當前提交
960d43e6fd
共有
1 個文件被更改
,包括
25 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+25
-0
BookFactory.java
+ 25
- 0
BookFactory.java
查看文件
@@ -0,0 +1,25 @@
import java.util.*;
class BookFactory
{
private List<Book> books = new ArrayList<Book>();
private int id;
public BookFactory()
{
id = 0;
}
public void newBook()
{
Book temp = new Book(id, "NOT AVAILABLE");
books.add(temp);
id++;
}
public Book getBook(int index)
{
return books.get(index);
}
}
Write
Preview
Loading…
取消
儲存