Advertisement
Guest User

sp

a guest
May 27th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. package TwoStudent30305411;
  2.  
  3. public class Library{
  4. //instance variables
  5. private String name;
  6. private int numItems;
  7.  
  8. LibraryItem itemList[] ;
  9. int maxItems=10; // default maximum number of items is 10
  10. int currsize;
  11.  
  12.  
  13. public Library() {
  14. itemList = new LibraryItem[maxItems];
  15. currsize= 0;
  16. }
  17.  
  18. // constructor with one parameter - maximum number of items in the library
  19. public Library(int _numMaxItems) {
  20. maxItems = _numMaxItems;
  21. itemList = new LibraryItem[maxItems];
  22. currsize =0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement