Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SoftEng Group 3
Weekly Planner
Commits
8a450a9b
Commit
8a450a9b
authored
Jun 06, 2021
by
Bagus Prabowo
Browse files
Course deletion with timetable connection
parent
10171934
Pipeline
#81809
failed with stages
in 8 minutes and 44 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Courses.csv
View file @
8a450a9b
rpl,ade,1:01:01,1:01:02
adpro,daya,5:05:05,7:07:07
daa,there,4:04:04,13:01:01
\ No newline at end of file
daa,there,4:04:04,13:01:01
out/production/SiJadwal_Simple/Softeng/Group3/SiJadwal/actor/Student.class
View file @
8a450a9b
No preview for this file type
out/production/SiJadwal_Simple/Softeng/Group3/SiJadwal/repository/CourseList.class
View file @
8a450a9b
No preview for this file type
out/production/SiJadwal_Simple/Softeng/Group3/SiJadwal/repository/TimetableList.class
View file @
8a450a9b
No preview for this file type
src/Softeng/Group3/SiJadwal/repository/CourseList.java
View file @
8a450a9b
package
Softeng.Group3.SiJadwal.repository
;
import
Softeng.Group3.SiJadwal.Main
;
import
Softeng.Group3.SiJadwal.model.Course
;
import
Softeng.Group3.SiJadwal.model.Timetable
;
import
java.sql.Time
;
import
java.util.ArrayList
;
...
...
@@ -46,6 +48,19 @@ public class CourseList {
public
void
deleteCourse
(
String
name
){
Course
delCourse
=
getCourse
(
name
);
TimetableList
timetableList
=
new
TimetableList
();
List
<
Timetable
>
containsCourse
=
TimetableList
.
getAllTimetableList
();
for
(
int
i
=
0
;
i
<
containsCourse
.
size
();
i
++){
List
<
Course
>
courses
=
containsCourse
.
get
(
i
).
getCourses
();
for
(
int
j
=
0
;
j
<
courses
.
size
();
j
++){
if
(
courses
.
get
(
j
).
getCourseName
().
equalsIgnoreCase
(
delCourse
.
getCourseName
())){
timetableList
.
getTimetable
(
containsCourse
.
get
(
i
).
getTimetableName
(),
containsCourse
.
get
(
i
).
getOwner
()).
deleteCourse
(
delCourse
);
CSVTimetable
.
updateCourseTimetable
(
containsCourse
.
get
(
i
).
getOwner
().
getUsername
(),
containsCourse
.
get
(
i
).
getTimetableName
(),
containsCourse
.
get
(
i
).
getCourses
());
break
;
}
}
}
courseList
.
remove
(
delCourse
);
CSVCourse
.
deleteCourse
(
name
);
}
...
...
src/Softeng/Group3/SiJadwal/repository/TimetableList.java
View file @
8a450a9b
package
Softeng.Group3.SiJadwal.repository
;
import
Softeng.Group3.SiJadwal.Main
;
import
Softeng.Group3.SiJadwal.actor.RoleType
;
import
Softeng.Group3.SiJadwal.actor.User
;
import
Softeng.Group3.SiJadwal.model.Course
;
import
Softeng.Group3.SiJadwal.model.Timetable
;
import
java.sql.Time
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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