Example #1
0
 /**
  * Adds a student to the classlist when there is enough slot
  *
  * @param stdNum
  * @return true if the student was successfully added
  */
 public boolean addStudent(String stdNum) {
   if (students.size() < section.getClassSize()) {
     if (!students.containsKey(stdNum)) {
       students.put(stdNum, stdNum);
       return true;
     } else {
       return false;
     }
   }
   return false;
 }
Example #2
0
 /**
  * Returns true if the classlist is full
  *
  * @return true if the classlist is full
  */
 public boolean full() {
   return (students.size() == section.getClassSize());
 }