SHARE
TWEET

Untitled

a guest Jun 30th, 2012 11 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Vector;
  2.  
  3. public class Librarian {
  4.  
  5.         private Vector <Book> list;
  6.  
  7.         public Librarian () {
  8.                 list = new Vector<Book>();
  9.         }
  10.  
  11.         public void add (Book b) {
  12.                 list.add(b);
  13.         }
  14.  
  15.         public void remove (Book b) {
  16.                 if (list.contains(b)) {
  17.                         list.remove(b);
  18.                 } else {
  19.                         System.out.println("Book not found!");
  20.                 }
  21.         }
  22.  
  23.         //inner class book
  24.         class Book {
  25.                 //add methods and parameters
  26.         }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top