Untitled
unknown
java
a year ago
1.9 kB
14
Indexable
public class Lecturer {
//===============================================================
// INSTANCE VARIABLE
//===============================================================
private int lecturerId;
private String fullName;
private int contactNumber;
private String emailAddress;
//===============================================================
// CONSTRUCTOR
//===============================================================
public Lecturer(int lecturerId, String fullName, int contactNumber, String emailAddress) {
this.lecturerId = lecturerId;
this.fullName = fullName;
this.contactNumber = contactNumber;
this.emailAddress = emailAddress;
}
//===============================================================
// SETTER
//===============================================================
public void setLecturerId(int lecturerId) {
this.lecturerId = lecturerId;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public void setContactNumber(int contactNumber) {
this.contactNumber = contactNumber;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
//===============================================================
// GETTER
//===============================================================
public int getLecturerId() {
return lecturerId;
}
public String getFullName() {
return fullName;
}
public int getContactNumber() {
return contactNumber;
}
public String getEmailAddress() {
return emailAddress;
}
public String toString() {
return " Lecturer ID: " + lecturerId + " Full Name: " + fullName + " Contact Number: " + contactNumber + " Email Address: " + emailAddress;
}
}
Editor is loading...
Leave a Comment