package csclasspkg;

public class ClassListBasic{
   private String[] myNames;
   private int myMaxEnrollment;
   private int myCurrentEnrollment;
   private String myCourseTitle;

   public ClassListBasic(String title, int maxEnroll){

   }

   // Accessors
   public int getEnrollment( ) {
       return myCurrentEnrollment;
   }

   public int getMaxEnrollment( ) {
       return myMaxEnrollment;
   }

   public String getTitle( ) {
       return myCourseTitle;
   }

   public boolean inCourse (String name) {
        return true;  // implement this using searchStudent
   }

   public boolean isThereRoom(){
        return false; // Fix this
   }

   public void printList( ) {  // output class list with title

   }

   // modifiers
   /**
    *  Return false if there is no room in the course or name already
    *  appears in myNames.  Otherwise add name to myNames and return true.
    */
   public boolean addStudent( String name){
         return true; // Use searchStudent and isThereRoom to implement
   }

   /**
    *  Return false if name is not in myNames.
    *  Otherwise,  eliminate name by moving all of the entries
    *  is up and return true.
    */
   public boolean dropStudent(String name){
      return true;           // Fix this
   }

   // private helpers
   /**
     *  Return the index of name in myNames if name is present
     *  or -1 if name does not appear in myNames.
     */
   private int searchStudent(String name){
      return -1;            // Fix this
   }
 }


