/* * MediumAnimal.java - Part of class hierarchy for representing residents of a pet kennel * CS112 Lab 13 * * Copyright (c) 2000 - Russell C. Bjork * */import java.io.PrintWriter;import java.util.Date;/** This class serves as a common base class for classes representing dogs and cats * */public abstract class MediumAnimal extends Pet{	public MediumAnimal(String name, String owner,						Date arrivalDate, Date departureDate,						float weight, boolean needsRabiesShot)	{	    super(name, owner, arrivalDate, departureDate);	    this.weight = weight;	    this.needsRabiesShot = needsRabiesShot;	}    public void printBill(PrintWriter printTo)    {		super.printBill(printTo);		if (needsRabiesShot)			printTo.println("P.S. I got a rabies shot - ouch.  " + 				 "The vet will send you a separate bill.");		else			printTo.println("P.S. My rabies shot was up to date.");	}	  	// Instance variables 		protected float weight;	private boolean needsRabiesShot;}