workshop done

This commit is contained in:
2026-04-20 21:16:24 +03:30
commit a80a1c47bf
9 changed files with 250 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
public class Course {
private String courseName;
private String courseCode;
private int capacity;
public Course(String courseName, String courseCode, int capacity)
{
this.courseName = courseName;
this.courseCode = courseCode;
this.capacity = capacity;
}
public String getCourseName()
{
return courseName;
}
public String getCourseCode()
{
return courseCode;
}
public int getCapacity()
{
return capacity;
}
public boolean reduceCapacity()
{
if (capacity > 0)
{
capacity--;
return true;
}
return false;
}
public void increaseCapacity()
{
capacity++;
}
}