Fakultas Ilmu Komputer UI

Commit d8af49de authored by hazlazuardi's avatar hazlazuardi
Browse files

Move CSV Utility to CSV Modules

parent 030c9273
Pipeline #82564 passed with stages
in 2 minutes and 47 seconds
package Softeng.Group3.SiJadwal;
import Softeng.Group3.SiJadwal.actor.Role;
import Softeng.Group3.SiJadwal.actor.RoleType;
import Softeng.Group3.SiJadwal.actor.User;
import Softeng.Group3.SiJadwal.model.Assignment;
import Softeng.Group3.SiJadwal.csv.CSVOperator;
import Softeng.Group3.SiJadwal.repository.*;
import Softeng.Group3.SiJadwal.utility.InputReader;
import java.io.*;
import java.sql.Time;
public class Main {
private static InputReader in = new InputReader(System.in);
......
package Softeng.Group3.SiJadwal.actor;
import Softeng.Group3.SiJadwal.csv.CSVAssignment;
import Softeng.Group3.SiJadwal.csv.CSVTimetable;
import Softeng.Group3.SiJadwal.model.Course;
import Softeng.Group3.SiJadwal.model.Timetable;
import Softeng.Group3.SiJadwal.model.Assignment;
import Softeng.Group3.SiJadwal.repository.*;
import Softeng.Group3.SiJadwal.Main;
import java.sql.Time;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
......@@ -366,10 +366,23 @@ public class Student extends Role {
assignmentList.deleteAssignment(picked3);
CSVAssignment.deleteAssignment(picked3.getAssignmentName());
break;
case 17:
System.out.println("Choose which assignment you want to see:");
assignmentList.listToString(assignmentList.getAssignmentList());
int cnt4 = 1;
for(Assignment s : assignmentList.getAssignmentList()){
System.out.println(cnt4 + ". " + s.getAssignmentName());
cnt4++;
}
String infoAss = in.next();
Assignment picked4 = assignmentList.getAssignmentList().get(Integer.parseInt(infoAss) - 1);
System.out.println("Picked: " + picked4.getAssignmentName());
System.out.println(assignmentList.getAssignment(picked4.getAssignmentName()));
break;
default:
}
}
......
......@@ -3,15 +3,12 @@ package Softeng.Group3.SiJadwal.actor;
import Softeng.Group3.SiJadwal.Main;
import Softeng.Group3.SiJadwal.model.Assignment;
import Softeng.Group3.SiJadwal.model.Course;
import Softeng.Group3.SiJadwal.model.Timetable;
import Softeng.Group3.SiJadwal.repository.AssignmentList;
import Softeng.Group3.SiJadwal.repository.CSVAssignment;
import Softeng.Group3.SiJadwal.csv.CSVAssignment;
import Softeng.Group3.SiJadwal.repository.CourseList;
import Softeng.Group3.SiJadwal.repository.TimetableList;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
......
package Softeng.Group3.SiJadwal.repository;
package Softeng.Group3.SiJadwal.csv;
import Softeng.Group3.SiJadwal.actor.User;
import Softeng.Group3.SiJadwal.model.Assignment;
......
package Softeng.Group3.SiJadwal.repository;
package Softeng.Group3.SiJadwal.csv;
import java.io.BufferedReader;
import java.io.FileReader;
......
package Softeng.Group3.SiJadwal.repository;
package Softeng.Group3.SiJadwal.csv;
import java.io.*;
import java.sql.Time;
......@@ -8,6 +8,10 @@ import Softeng.Group3.SiJadwal.actor.RoleType;
import Softeng.Group3.SiJadwal.model.Assignment;
import Softeng.Group3.SiJadwal.model.Course;
import Softeng.Group3.SiJadwal.model.Timetable;
import Softeng.Group3.SiJadwal.repository.AssignmentList;
import Softeng.Group3.SiJadwal.repository.CourseList;
import Softeng.Group3.SiJadwal.repository.TimetableList;
import Softeng.Group3.SiJadwal.repository.UserList;
public class CSVOperator {
public static void InitUsersCourses(UserList userlist, CourseList courselist, TimetableList timetableList, AssignmentList assignmentList){
......
package Softeng.Group3.SiJadwal.repository;
package Softeng.Group3.SiJadwal.csv;
import java.io.*;
import java.util.ArrayList;
......
package Softeng.Group3.SiJadwal.repository;
package Softeng.Group3.SiJadwal.csv;
import java.io.BufferedReader;
import java.io.FileReader;
......
package Softeng.Group3.SiJadwal.repository;
import Softeng.Group3.SiJadwal.csv.CSVCourse;
import Softeng.Group3.SiJadwal.csv.CSVTimetable;
import Softeng.Group3.SiJadwal.model.Course;
import Softeng.Group3.SiJadwal.model.Timetable;
......
package Softeng.Group3.SiJadwal.repository;
import Softeng.Group3.SiJadwal.actor.User;
import Softeng.Group3.SiJadwal.csv.CSVTimetable;
import Softeng.Group3.SiJadwal.model.Timetable;
import java.util.ArrayList;
......
......@@ -2,6 +2,8 @@ package Softeng.Group3.SiJadwal.repository;
import Softeng.Group3.SiJadwal.actor.RoleType;
import Softeng.Group3.SiJadwal.actor.User;
import Softeng.Group3.SiJadwal.csv.CSVTimetable;
import Softeng.Group3.SiJadwal.csv.CSVUser;
import java.util.ArrayList;
import java.util.List;
......
Supports Markdown
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