TEXT 29
Untitled Guest on 28th April 2021 01:34:15 PM
  1.  
  2. /**
  3.  * Write a description of your class here.
  4.  *
  5.  * @ldono
  6.  * 4/27/21
  7.  *
  8.  */
  9.  
  10. public class Book
  11. {
  12.    //Fields
  13.    
  14.    private String title;
  15.    private String author;
  16.    private int numPages;
  17.    private boolean isHardcover;
  18.    //Constructor
  19.    
  20.    
  21.    
  22.    //Methods
  23.    
  24.    public String getTitle()
  25.    {
  26.        return this.title;
  27.  
  28.    }
  29.    
  30.     public void setTitle(String s)
  31.    {
  32.         this.title = s; // sets title to s
  33.    }
  34.  
  35.    
  36.    public String getAuthor()
  37.    {
  38.        return this.author;
  39.  
  40.    }
  41. }

Paste-bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.