This website works better with JavaScript.
Home
Explore
Help
Sign In
binhong
/
LibrarySystem
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Implementation of BookFactory class
BookFactory is now implemented to handle all the books.
master
BinHong Lee
8 years ago
parent
da8ddfb495
commit
960d43e6fd
1 changed files
with
25 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+25
-0
BookFactory.java
+ 25
- 0
BookFactory.java
View File
@@ -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…
Cancel
Save