Need help writing a project, FAU has too many legacy systems that are getting di
ID: 3692460 • Letter: N
Question
Need help writing a project, FAU has too many legacy systems that are getting difficult to maintain independently. OIT has decided to build a customized system to manage course, student, and faculty information to reduce costs and increase efficiency in the long run. OIT needs your help in creating this new and customized system. Your task is to create an application to process course, student, and faculty data that have been exported into text files and implement features important to FAU. The information below describes: • Data contained in the relevant text files • Functionality that you are required to implement for OIT • Optional functionality that you may choose to implement for OIT • Additional details to help understand aspects of OIT Contents of the relevant data files: • Faculty.txt contains information about faculty currently employed at FAU: Faculty ID, First Name, Last Name, Hire Date, Title, Salary, Street, City, State, Zip Code, Phone, Email, Department ID • Students.txt contains information about students currently enrolled at FAU: Student ID, First Name, Last Name, Street, City, State, Zip Code, Phone, Email, Major ID, Expected Graduation Date • Schedule.txt contains information about course schedules each term: Course ID, CRN, Title, Term, Faculty ID, Room, Capacity, Credit Hours • CourseRoster.txt contains information about students enrolled in each course at FAU: CRN, Student ID, Grade • Department.txt contains information about the different academic departments on campus at FAU: Department ID, Department Name • Major.txt contains information about the available majors in the different departments at FAU: Major ID, Major Name, Department ID Required functionality: At a minimum, your program should allow users to perform the following actions. You will lose points if you do not allow users to complete these actions: • (10pts) Lists of objects storing data from files listed above • (5pts) Menu with user options • (10pts) View student information for a single student • (10pts) View course schedule • (10pts) Create a new student • (10pts) Create a new course • (15pts) Print list of courses taken by a student • (15pts) Add a student to a course ISM 3230 Group Project – Requirements Spring 2016 2 Optional functionality: You may complete any or all of the components below for additional points: • (10pts) View faculty information for a single faculty member • (10pts) View list of courses taught by a faculty member • (10pts) Print list of students and grades for a course • (10pts) Create a new faculty member • (15pts) Edit information for an existing student • (15pts) Edit information for an existing faculty member • (15pts) Change a student’s grade in a specific course • (5pts) Calculate GPA for all students across all sections • (5pts) Calculate GPA for a specific student • (5pts) Calculate GPA for a specific course section • Logic to prevent errors o View list of courses taken by a student § (3pts) Student must exist o View list of courses taught by a faculty member § (3pts) Faculty member must exist o Create a new student § (3pts) Student must not already exist § (3pts) Student’s major must exist § (3pts) Email address must be unique and have @my.fau.edu § (4pts) Graduation Date must be valid and in the future (month/year) o Create a new course § (3pts) Course section (CRN) must not already exist § (3pts) Faculty teaching section must already exist o Add a student to a course § (4pts) A seat must still be available in the course o Create a new faculty member § (3pts) Faculty member must not already exist § (3pts) Faculty must belong to an existing department § (3pts) Email address must be unique and have @fau.edu o Edit information for an existing student § (3pts) If change major, major must exist § (3pts) If change email address, must be unique and have @my.fau.edu § (2pts) Cannot change ZNumber o Edit information for an existing faculty member § (3pts) If change department, department must exist § (3pts) If change email address, must be unique and have @fau.edu § (2pts) Cannot change ZNumber o Change a student’s grade in a specific course § (3pts) Grade must be a valid grade
Explanation / Answer
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; class Test{ public static void main(String[] args) { ArrayList faculties = getFaculties(); ArrayList students = getStudents(); ArrayList schedules = getSchedules(); ArrayList rosters = getCourseRosters(); ArrayList departments = getDepartments(); ArrayList majors = getMajors(); } public static ArrayList getFaculties(){ ArrayList faculties = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("Faculty.txt")); while ((line = br.readLine()) != null) { Faculty f = new Faculty(); String[] arr = line.split(","); f.setFacultyID(Integer.parseInt(arr[0])); f.setFirstName(arr[1]); f.setLastName(arr[2]); f.setHireDate(arr[3]); f.setTitle(arr[4]); f.setSalary(Double.parseDouble(arr[5])); f.setStreet(arr[6]); f.setCity(arr[7]); f.setState(arr[8]); f.setZipCode(Integer.parseInt(arr[9])); f.setPhone(Integer.parseInt(arr[10])); f.setEmail(arr[11]); f.setDepartmentID(Integer.parseInt(arr[12])); faculties.add(f); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return faculties; } public static ArrayList getStudents(){ ArrayList students = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("Students.txt")); while ((line = br.readLine()) != null) { Student s = new Student(); String[] arr = line.split(","); s.setStudentID(Integer.parseInt(arr[0])); s.setFirstName(arr[1]); s.setLastName(arr[2]); s.setStreet(arr[3]); s.setCity(arr[4]); s.setState(arr[5]); s.setZipCode(Integer.parseInt(arr[6])); s.setPhone(Integer.parseInt(arr[7])); s.setEmail(arr[8]); s.setMajorID(Integer.parseInt(arr[9])); s.setExpectedGraduationDate(arr[10]); students.add(s); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return students; } public static ArrayList getSchedules(){ ArrayList schedules = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("Schedules.txt")); while ((line = br.readLine()) != null) { Schedule s = new Schedule(); String[] arr = line.split(","); s.setCourseID(Integer.parseInt(arr[0])); s.setCRN(Integer.parseInt(arr[1])); s.setTitle(arr[2]); s.setTerm(arr[3]); s.setFacultyID(Integer.parseInt(arr[4])); s.setRoom(Integer.parseInt(arr[5])); s.setCapacity(Integer.parseInt(arr[6])); s.setCreditHours(Integer.parseInt(arr[7])); schedules.add(s); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return schedules; } public static ArrayList getCourseRosters(){ ArrayList rosters = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("CourseRoster.txt")); while ((line = br.readLine()) != null) { CourseRoster r = new CourseRoster(); String[] arr = line.split(","); r.setCRN(Integer.parseInt(arr[0])); r.setStudentID(Integer.parseInt(arr[1])); r.setGrade(arr[2]); rosters.add(r); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return rosters; } public static ArrayList getDepartments(){ ArrayList departments = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("Department.txt")); while ((line = br.readLine()) != null) { Department d = new Department(); String[] arr = line.split(","); d.setDepartmentID(Integer.parseInt(arr[0])); d.setDepartmentName(arr[1]); departments.add(d); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return departments; } public static ArrayList getMajors(){ ArrayList majors = new ArrayList(); BufferedReader br = null; try { String line; br = new BufferedReader(new FileReader("Major.txt")); while ((line = br.readLine()) != null) { Major m = new Major(); String[] arr = line.split(","); m.setMajorID(Integer.parseInt(arr[0])); m.setMajorName(arr[1]); m.setDepartmentID(Integer.parseInt(arr[2])); majors.add(m); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return majors; } } class Faculty{ int facultyID; String firstName,lastName; String hireDate, Title; Double salary; String street, city, state; int zipCode, Phone; String email; int departmentID; public Faculty() { } public int getFacultyID() { return facultyID; } public void setFacultyID(int facultyID) { this.facultyID = facultyID; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getHireDate() { return hireDate; } public void setHireDate(String hireDate) { this.hireDate = hireDate; } public String getTitle() { return Title; } public void setTitle(String title) { Title = title; } public Double getSalary() { return salary; } public void setSalary(Double salary) { this.salary = salary; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getState() { return state; } public void setState(String state) { this.state = state; } public int getZipCode() { return zipCode; } public void setZipCode(int zipCode) { this.zipCode = zipCode; } public int getPhone() { return Phone; } public void setPhone(int phone) { Phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getDepartmentID() { return departmentID; } public void setDepartmentID(int departmentID) { this.departmentID = departmentID; } } class Student { int studentID; String firstName, lastName, street, city, state; int zipCode, phone; String email; int majorID; String expectedGraduationDate; public Student() { } public int getStudentID() { return studentID; } public void setStudentID(int studentID) { this.studentID = studentID; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getState() { return state; } public void setState(String state) { this.state = state; } public int getZipCode() { return zipCode; } public void setZipCode(int zipCode) { this.zipCode = zipCode; } public int getPhone() { return phone; } public void setPhone(int phone) { this.phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getMajorID() { return majorID; } public void setMajorID(int majorID) { this.majorID = majorID; } public String getExpectedGraduationDate() { return expectedGraduationDate; } public void setExpectedGraduationDate(String expectedGraduationDate) { this.expectedGraduationDate = expectedGraduationDate; } } class Schedule{ int courseID, CRN; String title, term; int facultyID, room, capacity; int creditHours; public Schedule() { } public int getCourseID() { return courseID; } public void setCourseID(int courseID) { this.courseID = courseID; } public int getCRN() { return CRN; } public void setCRN(int CRN) { this.CRN = CRN; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getTerm() { return term; } public void setTerm(String term) { this.term = term; } public int getFacultyID() { return facultyID; } public void setFacultyID(int facultyID) { this.facultyID = facultyID; } public int getRoom() { return room; } public void setRoom(int room) { this.room = room; } public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity; } public int getCreditHours() { return creditHours; } public void setCreditHours(int creditHours) { this.creditHours = creditHours; } } class CourseRoster{ int CRN, studentID; String grade; public CourseRoster() { } public int getCRN() { return CRN; } public void setCRN(int CRN) { this.CRN = CRN; } public int getStudentID() { return studentID; } public void setStudentID(int studentID) { this.studentID = studentID; } public String getGrade() { return grade; } public void setGrade(String grade) { this.grade = grade; } } class Department{ int departmentID; String departmentName; public Department() { } public int getDepartmentID() { return departmentID; } public void setDepartmentID(int departmentID) { this.departmentID = departmentID; } public String getDepartmentName() { return departmentName; } public void setDepartmentName(String departmentName) { this.departmentName = departmentName; } } class Major{ int majorID, departmentID; String majorName; public Major() { } public int getMajorID() { return majorID; } public void setMajorID(int majorID) { this.majorID = majorID; } public int getDepartmentID() { return departmentID; } public void setDepartmentID(int departmentID) { this.departmentID = departmentID; } public String getMajorName() { return majorName; } public void setMajorName(String majorName) { this.majorName = majorName; } }Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.