Introduction to Classes

 
public class Servant {

  
  private String name;
  
  private int age;
  
  
  public Servant( String name, int age) {
  
    this.name = name;
    
    this.age = age;
    
  }
  
  
  public String buyItem(String item, int price) {
  
    return item;
    
  }
  
  public void returnBook(String title) {
    
    //Take book back to library
  
  }
  
  public void returnBook(String title, int fine) {
    
    //Take book back to library and pay overdue fine
  
  }
  
  public void hasBirthday () {
  
    age++;
    
  }

  public static void main(String[] args) {
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  









  
  
  
  
  }
}