Fakultas Ilmu Komputer UI

Commit fc82964d authored by saddamonpc's avatar saddamonpc
Browse files

Remove un-needed comments and Fix camel casing

parent de372331
Pipeline #82840 passed with stage
in 2 minutes and 45 seconds
......@@ -27,7 +27,7 @@ public class Appointment implements Serializable {
this.status = "Pending";
}
public String generateId(){
public String generateId() {
int leftLimit = 65; // letter 'A'
int rightLimit = 90; // letter 'Z'
int targetStringLength = 5;
......@@ -43,11 +43,12 @@ public class Appointment implements Serializable {
}
public String toString() {
return "ID: " + id + "\nDate: " + date + "\nStudent: " + student.getUsername() + "\nTA: " + ta.getUsername() + "\nStart Time : " + startTime + "\nEnd Time: " + endTime + "\nDescription: " + description + "\nStatus: " + status;
//return date + student + " " + ta + " " + startTime + " - " + endTime + " " + description + status;
return "ID: " + id + "\nDate: " + date + "\nStudent: " + student.getUsername() +
"\nTA: " + ta.getUsername() + "\nStart Time : " + startTime + "\nEnd Time: " + endTime +
"\nDescription: " + description + "\nStatus: " + status;
}
public String getId (){
public String getId() {
return id;
}
......@@ -59,8 +60,8 @@ public class Appointment implements Serializable {
return status;
}
public void setStatus (String newstatus){
this.status = newstatus;
public void setStatus(String newStatus) {
this.status = newStatus;
}
}
......@@ -43,7 +43,7 @@ public class Admin extends User {
System.out.println();
// Uncomment to include the printing of the false users
// DEBUG: include the printing of the false users
// for (User user: userList.userList) {
// System.out.println(user);
// }
......
......@@ -22,8 +22,9 @@ public class Student extends UserStudent {
}
// Adds appointment with the corresponding TeachingAssistant
public void setAppointment(String date, String TAusername, String startTime, String endTime, String description, UserList userList) {
TeachingAssistant ta = userList.searchTA(TAusername);
public void setAppointment(String date, String TAUsername,
String startTime, String endTime, String description, UserList userList) {
TeachingAssistant ta = userList.searchTA(TAUsername);
if (ta.getUsername().equals("falseTA")) {
System.out.println("TA not found");
} else {
......
......@@ -80,6 +80,7 @@ public class TeachingAssistant extends UserStudent {
}
// Everytime this method is invoked, askPermissionAdmin will be updated to null
// Which means, TA will only be notified once after logging in.
public void getAskPermissionAdmin() {
if (this.askPermissionAdmin != null) {
System.out.println();
......
......@@ -70,7 +70,7 @@ class TeachingAssistantTest {
testTa.setSchedule("saturday", "Busy", "07:00", "21:00");
testTa.setSchedule("sunday", "Busy", "07:00", "21:00");
// testTa.seeCalendar();
testTa.seeCalendar(testTa.getUsername(), userList);
// Remove all linebreaks from the print, since different environment uses different line separators
String outContentEdit = outContent.toString().replaceAll("\n", "").replaceAll("\r", "");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment