attached file
HW9_CIT591_StudentManagementSystem.docx Introduction to Software Development Homework 9 : Student Management System (Deadline as per Canvas) For HW9, you are allowed to collaborate with 1 other student in this course. Each of you will still need to individually submit your code to Codio as usual. Please mention your collaborator’s name at the top of each of your code files, and whether you are submitting the same code or different code. On the Homework 9 submission page in Canvas, you will find a link to a teammate sign-up form. Please fill out this form by the date indicated on the form. We’ll learn more about Version Control & Git later in the course, but if you want to use GitHub (or some similar cloud-based code management system) to set up a remote code repository for code collaboration, you can. Feel free to look ahead to "Version Control & Git" in Module 14 if you like. If you use GitHub (or some similar cloud-based code management system) to set up a remote code repository for code collaboration, YOU ARE REQUIRED TO KEEP THAT REPOSITORY PRIVATE AND ONLY SHAREWITH YOUR OTHER GROUP/TEAM MEMBER. DO NOT CREATE PUBLICLY ACCESSIBLE REPOSITORIES TO HOST ANY ASSIGNMENTS IN THIS COURSE. If you are caught posting code to a publicly accessible location, it will be considered cheating. We will notify The Office of Student Conduct (OSC) and you will fail the course. Like the previous assignment, this homework is also very detailed, so please start as early as you can on it. It deals with the following topics: ● Object-Oriented Programming Design ● Inheritance ● File I/O ● Regex Introduction In this homework, you will implement a console-based student management system. The objective of this assignment is to design a system for students to Introduction to Software Development manage their courses. There will be three main user roles in the application: Admin, Student, and Professor. In the student management system, a) A student can log in to their account, view/add/drop courses, check their course schedule, and view grades. b) A professor can view course information they have, and view the student lists for these courses. c) An admin can view course/student/professor lists, and add/delete courses/students/professors. The course information will be in the courseInfo.txt file. There will also be three files containing student/professor/admin information. The student management system will read and parse all of the files. Once all information has been loaded into the system, you’ll be able to log in as a(n) student/professor/administrator to test the system. You are expected to design several classes and to implement methods to build the application. For example, you may create a class FileInfoReader to load the files. You can create an abstract class User and a Professor class, Student class, and Admin class which all extend and implement the User class. You can have a Course class that represents a single course and a Controller class to control the main logic of the entire system. Below are explanations (and samples) of the pieces of information in each of the four provided data files. courseInfo.txt - Courses information file that contains: course ID; course name; lecturer; days; start time; end time; capacity CIT590; Programming Languages and Techniques; Brandon L Krakowsky; MW; 16:30; 18:00; 110 studentInfo.txt - Student information file that contains: student ID; student name; student username; password; course ID: course grade (could be multiple) 001; StudentName1; testStudent01; password590; CIS191: A, CIS320: A profInfo.txt - Professor information file that contains: prof name; prof ID; prof username; password Clayton Greenberg; 001; Greenberg; password590 adminInfo.txt - Admin information file that contains: admin ID; admin name; admin username; password 001; admin; admin01; password590 Below are examples of what the system could look like. Feel free to make your program do exactly this or make it look even fancier. When entering the system, one can select to log in as a(n) student/professor/admin, or quit the system. Introduction to Software Development Student Login When logging in as a student, one can view course information, add/drop courses, view grades, or return to the previous menu. View all courses: All courses are displayed in the console. After adding course CIT590 to the student’s schedule. If one tries to add a course which has already been added to their schedule, the system should prompt a message towards this. In addition, if one tries to add a course which doesn’t exist in the system, the operation will not succeed. Introduction to Software Development One cannot add a course which has a time conflict with another added course. Drop a course: If one tries to drop a course which is not on his/her schedule, the operation will not succeed. View grades: Grades for courses taken are displayed in the console. Introduction to Software Development Professor Login When logging in as a professor, one can view the information for courses they teach, view students list, or return to the previous menu. After student StudentName2 with ID 002 has added CIT590, the lecturer can see the student’s basic information. Administrator Login When choosing to login as an administrator, one can add/delete/edit/view a course/professor/student information, or return to the previous menu. Introduction to Software Development If an admin wants to add a course that already exists in the system, the program should prompt with a message. If the lecturer of the course we want to add does not exist in the system, we also need to add the new professor to the system first, otherwise, this operation will not succeed. Introduction to Software Development When adding a new course given by a lecturer, the program needs to check if the course has a time conflict with all of the lecturer’s other courses. After adding a new course, we can see the newly added course CIT900 in the system. An admin can add a new student/professor to the system. Introduction to Software Development When adding a new student/professor, the program needs to check if the ID and username already exists in the system. Introduction to Software Development When deleting courses/professors/students/, the program needs to check if the courses/professors/students/ in fact exist in the system. You may assume all input is valid. Your Tasks: 1. Read and parse the provided files in Java, cleaning them up if/when needed. You may assume the information in the files is valid. a. Courses information file – courseInfo.txt. This file contains information for a number of courses. The information for each course is on a separate line. The pieces of information for each course are separated by semicolons (“;”). We want you to read the file in and load the information. b. Admin information file – adminInfo.txt. This file contains basic information for administrators including username, password, name, and ID. You need to read the file and load the information. c. Student information file – studentInfo.txt. This file contains basic information for students. d. Professor information file – profInfo.txt. This file contains basic information for professors. e. You may assume all of the information in the files is valid. For example, all information for professors in the courseInfo.txt file is given in the proInfo.txt file. We suggest that you load the list of professors before loading the list of courses. 2. Design the student management system We are not going to provide you with a specific design for this homework. Feel free to design your own student management system. We do, however, require you to have the following: a. At the very least, you MUST have a Controller class that launches and runs the management system. This class displays the menu, helps with user login, accomplishes the different user operations and continuously takes in user input. The Controller class must have the main() method.. Note, the Controller.java file SHOULD NOT be in a package. (See screenshot on the next page.) Here are some other suggestions: a. You need a FileInfoReader class that reads and parses the files. b. You need a class that defines a Course. The Course class is expected to have instance variables which store all of the information for the course. It also needs to provide functionality, for example, checking if one course has a time conflict with another course, adding/removing students from the course, and other helper methods you may need. Introduction to Software Development c. You need classes that define a Student, Professor, and Administrator. And they are expected to share some common attributes and to share as much code as possible. We want you to think hard about how you can accomplish this. This answer lies within the scope of the object-oriented concepts we have covered in this course. For example, you might have a User class with a subclass Student for the functionality of student operations like adding/dropping/viewing courses, a subclass to represent Professor, and a subclass Admin to add/delete/view information for courses, students and professors. Here is an overview of the suggested class (and package) structure described above. Testing Regardless of your design, we expect you to write unit tests for every public method. The only public methods that you can leave untested are the following: methods that get input from the user or simply display information to the user, and simple getters and setters. You do not need to test helper methods that are declared private. A method that reads and parses files could still be tested. Also, if a method does some computation and prints to the console, then the computation part of the method should still be tested. Introduction to Software Development You can create any number of test files and place them in any package, but you MUST name the test files in the format “
Test.java”. For example, if you were to create a test file for your FileInfoReader class, you MUST name it FileInfoReaderTest.java. Javadocs Add Javadocs for all classes, methods, and variables. What to Submit Please submit all packages and classes in your entire Java project. Make sure it includes everything in your “src” folder. If working in a group, both team members must submit. Include the names of the members of your team as part of the @author tag in the Javadocs for all of your classes. Evaluation You will be graded out of 40 points: ● Code writing, functionality, and design (20 pts) o At the very least, did you write a Controller.java that launches and runs the program? o Did you make sure Controller.java is not in a package? o Does the system work as expected? o Did you make good design decisions about code reuse? ▪ How much code is being shared between Student, Professor and Admin? ▪ How is this code sharing being achieved in your design? o Does the code take too long to run? (10 seconds would be too long!) ● Loading, parsing, and navigating files (10 pts) o Did you keep file I/O in as few methods as possible? o Did you correctly load valid data from every file? o What data structure(s) did you use? ● Unit testing (5 pts) o Are your test filenames in the format Test.java? For example, a test file for a class named FileInfoReader must be named FileInfoReaderTest.java. Introduction to Software Development o Did you write unit tests for every public method (excluding simple getters and setters)? ● Style & Javadocs (5 pts) o Adding Javadocs to all methods and variables, and comments to all non-trivial code o Properly naming variables, using proper indentation, etc.