View difference between Paste ID: QXc9X9Hw and G4La8PQh
SHOW: | | - or go back to the newest paste.
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
}