/**
   This class holds data for a computer science student.
*/

public class CompSciStudent extends Student
{
   // Required hours
   private final int CS_HOURS = 40;     // Comp sci hours

   // Hours taken
   private int csHours;    // Comp sci hours taken

   /**
      The Constructor sets the student's name, 
      ID number, and the year admitted.
      @param n The student's name.
      @param id The student's ID number.
      @param year The year the student was admitted.
   */

   public CompSciStudent(String name, String id, int year)
   {
      super(name, id, year);

   }

   /**
      The setCsHours method sets the number of 
      computer science hours taken.
      @param cs The computer science hours taken.
   */

   public void setCsHours(int cs)
   {
      csHours = cs;
   }

   /**
      The setGenEdHours method sets the number of 
      general ed hours taken.
      @param genEd The general ed hours taken.
   */

   public void setGenEdHours(int genEd)
   {
      genEdHours = genEd;
   }

   /**
      The getRemainingHours method returns the
      the number of hours remaining to be taken.
      @return The hours remaining for the student.
   */

   public int getRemainingHours()
   {
      int remainingHours;  // Remaining hours
      
      // Calculate the remaining hours.
      remainingHours = super.getRemainingHours() - csHours;
                         
      return remainingHours;
   }

   /**
      The toString method returns a string containing
      the student's data.
      @return A reference to a String.
   */
   
   public String toString()
   {
      String str;

      str = super.toString() +
         "\nMajor: Computer Science" +
         "\nComputer Science Hours Taken: " + csHours +
         "\nGeneral Ed Hours Taken: " + genEdHours;

      return str;
   }
}