Class Lab

java.lang.Object
Lab

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

    Constructors 
    Constructor Description
    Lab​(int cap, java.lang.String day)
    Labs constructor
  • Method Summary

    Modifier and Type Method Description
    void calculateAvg()
    this method is used to calculate the students average
    void enrollment​(Student std)
    checks if the student can enroll to the class according to the current size and the capacity
    int getAvg()
    getter for average which returns the average
    int getCapacity()
    a getter for capacity
    java.lang.String getDay()
    a normal getter for day which gets the day
    Student[] getStudents()
    getter for students which returns the array of students
    void print()
    prints the students and also the average which is calculated
    void setCapacity​(int capacity)
    a setter for capacity
    void setDay​(java.lang.String day)
    a setter for day
    void setStudents​(Student[] students)
    setter for students which sets te new list of students

    Methods inherited from class java.lang.Object

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

    • Lab

      public Lab​(int cap, java.lang.String day)
      Labs constructor
      Parameters:
      cap - is the lab capacity
      day - is the date
  • Method Details

    • enrollment

      public void enrollment​(Student std)
      checks if the student can enroll to the class according to the current size and the capacity
    • print

      public void print()
      prints the students and also the average which is calculated
    • getStudents

      public Student[] getStudents()
      getter for students which returns the array of students
      Returns:
      the students list as an array
    • setStudents

      public void setStudents​(Student[] students)
      setter for students which sets te new list of students
      Parameters:
      students - is the new students list
    • getAvg

      public int getAvg()
      getter for average which returns the average
      Returns:
      avg average
    • calculateAvg

      public void calculateAvg()
      this method is used to calculate the students average
    • getDay

      public java.lang.String getDay()
      a normal getter for day which gets the day
      Returns:
      day
    • setDay

      public void setDay​(java.lang.String day)
      a setter for day
      Parameters:
      day - will set the day
    • getCapacity

      public int getCapacity()
      a getter for capacity
      Returns:
      the class capacity
    • setCapacity

      public void setCapacity​(int capacity)
      a setter for capacity
      Parameters:
      capacity - will be the new lab capacity