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 studentsvoid
enrollStudent(Student std)
add the student from Student class to the Labint
getAvg()
get the average of grade of studentsint
getCapacity()
get the capacity of Labjava.lang.String
getDay()
get the day of LabStudent[]
getStudents()
get array of studentvoid
print()
print information of the all students who attend the Lab and print average of grade of studentsvoid
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
-
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 Labday
- time of Lab
-
-
Method Details
-
enrollStudent
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
get array of student- Returns:
- students field
-
setStudents
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
-