Class Lab

java.lang.Object
Lab

public class Lab
extends java.lang.Object
this class gives data about each course's lab
  • Constructor Summary

    Constructors 
    Constructor Description
    Lab​(java.lang.String TA, java.lang.String day, Course course, int capacity)
    creat a new lab
  • Method Summary

    Modifier and Type Method Description
    void enrollStudent​(Student student)  
    java.lang.String getDay()
    return the lab's day
    Student[] getStudents()
    return list of student
    java.lang.String getTA()  
    boolean hasCapacity()
    check out if there is capacity yet or not
    void printL()  
    void setCurrentSize​(int currentSize)  
    void setDay​(java.lang.String day)  
    void setStudents​(Student[] students)  
    void setTA​(java.lang.String TA)
    set a TA

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lab

      public Lab​(java.lang.String TA, java.lang.String day, Course course, int capacity)
      creat a new lab
      Parameters:
      TA - teacher assistant
      day - the day which lab is working
      course - the lab's name
      capacity - the limit of lac
  • Method Details

    • setTA

      public void setTA​(java.lang.String TA)
      set a TA
      Parameters:
      TA - teacher assistant
    • getTA

      public java.lang.String getTA()
      Returns:
      TA
    • setDay

      public void setDay​(java.lang.String day)
      Parameters:
      day - set a day for lab
    • getDay

      public java.lang.String getDay()
      return the lab's day
      Returns:
      day
    • setStudents

      public void setStudents​(Student[] students)
      Parameters:
      students - set student to student list
    • getStudents

      public Student[] getStudents()
      return list of student
      Returns:
      students
    • hasCapacity

      public boolean hasCapacity()
      check out if there is capacity yet or not
      Returns:
      true or false
    • setCurrentSize

      public void setCurrentSize​(int currentSize)
      Parameters:
      currentSize - of the lab
    • enrollStudent

      public void enrollStudent​(Student student)
      Parameters:
      student - assign a new student to this lab
    • printL

      public void printL()