Advertisement
ruhul0

Book

Feb 27th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1.  
  2. public class Book {
  3.     String bookTitle,isbn;
  4.     String author;
  5.     int numOfCopies;
  6.    
  7.    
  8.  
  9.     public Book(String bookTitle, String author, String isbn, int numOfCopies) {
  10.         super();
  11.         this.bookTitle = bookTitle;
  12.         this.author = author;
  13.         this.isbn = isbn;
  14.         this.numOfCopies = numOfCopies;
  15.     }
  16.  
  17.  
  18.  
  19.     void display()
  20.     {
  21.         System.out.println("Title: " + bookTitle + " Author: " + author + " ISBN: " + isbn + " Quantity: " + numOfCopies);
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement