Untitled

mail@pastecode.io avatar
unknown
java
5 months ago
1.7 kB
5
Indexable
public class Classroom {

    //===============================================================
    // INSTANCE VARIABLE
    //===============================================================

    private int classroomNum;
    private String classroomName;
    private String classroomLocation;

    //===============================================================
    // CONSTRUCTOR
    //===============================================================

    public Classroom(int classroomNum, String classroomName, String classroomLocation) {
        this.classroomNum = classroomNum;
        this.classroomName = classroomName;
        this.classroomLocation = classroomLocation;
    }

    //===============================================================
    // SETTER
    //===============================================================

    public void setClassroomNum(int classroomNum) {
        this.classroomNum = classroomNum;
    }

    public void setClassroomName(String classroomName) {
        this.classroomName = classroomName;
    }

    public void setClassroomLocation(String classroomLocation) {
        this.classroomLocation = classroomLocation;
    }

    //===============================================================
    // GETTER
    //===============================================================

    public int getClassroomNum() {
        return classroomNum;
    }

    public String getClassroomName() {
        return classroomName;
    }

    public String getClassroomLocation() {
        return classroomLocation;
    }

    public String toString() {
        return "Classroom Number: " + classroomNum + " Classroom Name: " + classroomName + " Classroom Location: " + classroomLocation;
    }

}
Leave a Comment