Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void addBook(int x, String title, String author, int year, String isbn, double price, String subject, String wisbn, int numProblems){
- if (x == 1){
- Workbook newWBook = new Workbook (title, author, year, isbn, price, numProblems);
- bookMap.put(newWBook.hashCode(), newWBook);
- }
- else if (x == 2){
- Textbook newTBook = new Textbook (title, author, year, isbn, price, wisbn, subject);
- bookMap.put(newTBook.hashCode(), newTBook);
- }
- else if (x == 3 ){
- Textbook newBook = new Textbook (title, author, year, isbn, price, wisbn, subject);
- bookMap.put(newBook.hashCode(), newBook);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement