Initial Commit P2 Part 1

This commit is contained in:
2024-02-02 12:48:51 +00:00
parent 4510474a90
commit 2b33fac04c
8 changed files with 193 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/**
* 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();
}
}
}