Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
G4-SoftEng
Group4-SoftEng
Commits
fc82964d
Commit
fc82964d
authored
Jun 22, 2021
by
saddamonpc
Browse files
Remove un-needed comments and Fix camel casing
parent
de372331
Pipeline
#82840
passed with stage
in 2 minutes and 45 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/softeng/g4/appointment/Appointment.java
View file @
fc82964d
...
...
@@ -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
new
s
tatus
){
this
.
status
=
new
s
tatus
;
public
void
setStatus
(
String
new
S
tatus
)
{
this
.
status
=
new
S
tatus
;
}
}
src/main/java/softeng/g4/user/Admin.java
View file @
fc82964d
...
...
@@ -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);
// }
...
...
src/main/java/softeng/g4/user/Student.java
View file @
fc82964d
...
...
@@ -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
{
...
...
src/main/java/softeng/g4/user/TeachingAssistant.java
View file @
fc82964d
...
...
@@ -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
();
...
...
src/test/java/softeng/g4/user/TeachingAssistantTest.java
View file @
fc82964d
...
...
@@ -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"
,
""
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment