37 lines
618 B
Java
37 lines
618 B
Java
|
|
/**
|
|
* Write a description of class Library here.
|
|
*
|
|
* @author (your name)
|
|
* @version (a version number or a date)
|
|
*/
|
|
|
|
import java.util.ArrayList;
|
|
|
|
public class Library
|
|
{
|
|
private ArrayList<LibraryItem> itemList;
|
|
|
|
/**
|
|
* Constructor for objects of class Library
|
|
*/
|
|
public Library()
|
|
{
|
|
itemList = new ArrayList<LibraryItem>();
|
|
}
|
|
|
|
public void storeItem( LibraryItem item )
|
|
{
|
|
itemList.add( item );
|
|
}
|
|
|
|
public void printAllItems()
|
|
{
|
|
for( LibraryItem item : itemList )
|
|
{
|
|
item.printDetails();
|
|
}
|
|
}
|
|
|
|
}
|