Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. Library l1 = new Library();
  2. Date d1 = new Date(11111990);
  3. Date d2 = new Date(871991);
  4.  
  5.  
  6. FictionBook b1 = new FictionBook("Harry Potter", "JK Rowling", "I132414","1",d1,d2,true,"Action");
  7. NonFictionBook b2 = new NonFictionBook("The Hobbit", "Tolkien", "I343435","1",d1,d2,true,"Fantasy");
  8. Journal b3 = new Journal("Space, the universe and everything" , "Adam Holmwood", "I3325","1", d1,d2,true,"science");
  9.  
  10. l1.theBooks.add(0, b3);
  11. l1.theBooks.add(1, b2);
  12. l1.theBooks.add(2, b1);
  13.  
  14. System.out.println(l1.currentBook().toString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement