Class Lab

java.lang.Object
Lab

public class Lab
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Lab​(int capacity, java.lang.String day)
    Create a new Lab with a given capacity of Lab and Class day .
  • Method Summary

    Modifier and Type Method Description
    void calculateAvg()
    calculating the averge of grade of students
    void enrollStudent​(Student std)
    add the student from Student class to the Lab
    int getAvg()
    get the average of grade of students
    int getCapacity()
    get the capacity of Lab
    java.lang.String getDay()
    get the day of Lab
    Student[] getStudents()
    get array of student
    void print()
    print information of the all students who attend the Lab and print average of grade of students
    void setCapacity​(int capacity)  
    void setDay​(java.lang.String day)  
    void setStudents​(Student[] students)
    we pass the array of students to this method and set into Lab and update the currentSize

    Methods inherited from class java.lang.Object

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

    • Lab

      public Lab​(int capacity, java.lang.String day)
      Create a new Lab with a given capacity of Lab and Class day .
      Parameters:
      capacity - of Lab
      day - time of Lab
  • Method Details

    • enrollStudent

      public void enrollStudent​(Student std)
      add the student from Student class to the Lab
      Parameters:
      std - is the student that is from Student class
    • print

      public void print()
      print information of the all students who attend the Lab and print average of grade of students
    • getStudents

      public Student[] getStudents()
      get array of student
      Returns:
      students field
    • setStudents

      public void setStudents​(Student[] students)
      we pass the array of students to this method and set into Lab and update the currentSize
      Parameters:
      students - array of students
    • getAvg

      public int getAvg()
      get the average of grade of students
      Returns:
      avg field
    • calculateAvg

      public void calculateAvg()
      calculating the averge of grade of students
    • getDay

      public java.lang.String getDay()
      get the day of Lab
      Returns:
      day field
    • setDay

      public void setDay​(java.lang.String day)
      Parameters:
      day - set time of Lab
    • getCapacity

      public int getCapacity()
      get the capacity of Lab
      Returns:
      capacity field
    • setCapacity

      public void setCapacity​(int capacity)
      Parameters:
      capacity - set the capacity of Lab