ASSIGNMENT 1 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Submission date 23/06/2023 Date Received 1st submission 23/06/2023 Re-submission Date Date Received 2nd submission Student Name Tran Duc Long Student ID GCH210562 Class GCH1106 Assessor name Dinh Duc Manh Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid Grade (0-10) 1.1 Page 1 of 159 ❒ Summative Feedback: ❒ Resubmission Feedback: 2.1 Grade: Assessor Signature: Date: IV Signature: Page 2 of 159 Table of Contents I. Login and Register.
Methods of reading and writing data to file. Methods of reading and writing data to mySQL in Xampp. Methods sort by criteria. Methods search by criteria.
How to handle errors. Error when user entered wrong input data. Error when saving file. Error when connect xampp.
Screenshots of running program. Tab class division. 158 Page 6 of 159 Table of Figures Figure 1: Wireframe Sign up and login. 13 Figure 2: Wirfeframe tab Subject.
14 Figure 3: Wireframe tab student. 15 Figure 4: Wireframe tab register. 16 Figure 5: Wireframe tab Class division. 17 Figure 6: My program structure.
19 Figure 7: Class InvalidPersonIdException. 20 Figure 8: Class InvalidStudentIdException. 21 Figure 9: Class InvalidNameException. 22 Figure 10: Class InvalidPhoneNumberException.
23 Figure 11: Class InvalidEmailException:. 25 Figure 12: Class InvalidDateOfBirthException. 26 Figure 13: Class InvalidPasswordException. 27 Figure 14: Class account in model package.
31 Figure 15: Class Subject. 34 Figure 16: Class Person. 40 Figure 17: Class Student. 43 Figure 18: Class Registering.
45 Figure 19: Class Course. 46 Figure 20: Class SortRegisteringByRegisterTimeEL. 47 Figure 21: Class SortRegisteringByRegisterTimeEL. 47 Figure 22: Class SortRegisteringByStudentNameAZ.
48 Figure 23: Class SortRegisteringByStudentNameZA. 48 Figure 24: Class SortStudentByNameASC. 48 Figure 25: Class SortStudentByNameDESC. 49 Figure 26: Class SortStudentByStudentIdASC.
49 Figure 27: Class sortSubjectByNumOfLessonASC. 50 Figure 28: Class sortSubjectByNumOfLessonDESC. 50 Page 7 of 159 Figure 29: Class sortSubjectByNameASC. 50 Figure 30: Class sortSubjectByNameDESC.
51 Figure 31: Interface InforFilter. 51 Figure 32: Method isStudentIdValid. 52 Figure 33: Method isPersonIdValid. 52 Figure 34: Method isNameValid.
53 Figure 35: Method isEmailValid. 53 Figure 36: Method isPhoneNumberValid. 54 Figure 37: Method isDateOfBirthValid. 54 Figure 38: Method isPasswordValid.
55 Figure 39: Interface DataController. 57 Figure 40: Method writeToFile. 58 Figure 41: Method readDataFromFile. 59 Figure 42: Method connect xampp with netbeans.
60 Figure 43: Method login. 61 Figure 44: Method Register account. 62 Figure 45: Methods sort by critiea of Subject. 63 Figure 46: Methods sort by critiea of Student.
63 Figure 47: Method sort by critiea of Registering. 64 Figure 48: Method createCourse. 65 Figure 49: Methods search by critiea of Subject. 66 Figure 50: Method search by critiea of Student.
67 Figure 51: Method search by critiea of Registering. 68 Figure 52: Method addActionListener. 69 Figure 53: Method actionPerformed. 69 Figure 54: Method loadData.
70 Figure 55: Method loginSystem. 71 Figure 56: Methods catch event. 72 Figure 57: Method registerAccounts. 73 Figure 58: Constructor in HomeFrm.
74 Page 8 of 159 Figure 59: Methods catch events in HomeFrm. 77 Figure 60: Method loadData. 77 Figure 61: Method showData. 78 Figure 62: Methods to display the Add forms.
80 Figure 63: Methods add callback object. 81 Figure 64: Methods to display forms Update. 81 Figure 65: Methods edit callback object. 82 Figure 66: Methods remove data in tables.
83 Figure 67: Methods sorting data by critiea. 84 Figure 68: Methods refresh data in tables. 85 Figure 69: Methods search data by critiea. 89 Figure 70: Methods AddSubjectDialog.
89 Figure 71: Method ClearInputData. 90 Figure 72: Method addNewSubject. 90 Figure 73: Constructors of AddStudentDialog form. 91 Figure 74: Method addNewStudent.
93 Figure 75: Constructors of addRegisterDialog form. 94 Figure 76: Method searchSubject. 95 Figure 77: Method searchStudent. 95 Figure 78: Method addNewRegister.
96 Figure 79: Method editStudent. 98 Figure 80: method showData. 99 Figure 81: Method editSubject. 99 Figure 82: Method searchSubjectByName.
100 Figure 83: Method searchSubjectByLessonRange. 102 Figure 84: Validate process Sign Up account. 103 Figure 85: Input data of Student. 104 Figure 86: Process write data to file.
105 Figure 87: Process read data from file. 106 Figure 88: Process connect netbeans to xampp. 107 Page 9 of 159 Figure 89: Contructor Class test DataControllerImpTest. 109 Figure 90: Methods to test methods sort and search in DataControllerImp class.
113 Figure 91: Result test methods in class DataControllerImp by Junit. 114 Figure 92: Contructor Class test InforFilterImpTest. 114 Figure 93: Methods to test validate data in InforFilterImp Class. 116 Figure 94: Result test methods in class InforFilterImp by Junit.
116 Figure 95: Edit code method isNameValid. 147 Figure 96: Final test results. 147 Figure 97: Sign up form. 148 Figure 98: Login form.
149 Figure 99: Screenshot of subject tab. 150 Figure 100: Screenshot of add subject. 151 Figure 101: Screenshot of edit subject. 152 Figure 102: Screenshot of student tab.
153 Figure 103: Screenshot of add student. 154 Figure 104: Screenshot of edit student. 155 Figure 105: Screenshot of Register tab. 156 Figure 106: Screenshot of add a new Register.
157 Figure 107: Screenshot of class division tab. Introduction I was tasked with developing an app to address a problem faced by small businesses. Specifically, the app aims to assist teachers in effectively managing students and subjects of Greenwich in a straightforward and user-friendly manner. By doing so, it enables them to organize classes for students based on individual subjects, thus resolving the challenges of providing up-to-date information on subjects and class schedules to students.
Consequently, I have created a compact project named "Course Enrollment Management System." In this program, I employ a graphical user interface that incorporates the basic functionalities of Create, Read, Update, and Delete. Additionally, I have implemented advanced features like search and sort to enhance the application's functionality. To store and retrieve data, I utilize both file operations and a MySQL database. To ensure a smooth user experience, I have implemented data validation techniques that generate custom exceptions to handle errors.
Lastly, I have employed JUnit Test to thoroughly examine all the primary functions of the registering course management program for Greenwich Viet Nam. Requirement Based on the problem statement provided earlier, the key features of my project are as follows: • The application must possess an intuitive and user-friendly interface design. • Users should be able to input information conveniently through the use of forms. Register • User can register an account with Email and Password.
(Email must have the extension @fpt. Login • User login with registered user information Home • In the main interface of the application I divided into 4 tabs: Subject, Student, Register and Class Division. Tab Subjects o The program allows adding Subjects to the table. o The program allows users to view all Subjects information that has been added to the table.
o The program allows users to update all information (except ID) of any Subjects. Page 11 of 159 o The program allows users to delete all fields on the form that they have filled out because of incorrect input to re-fill. o The program allows users to search for subjects information by approximate name. o The program allows users to search for subject information by number of lessons.
o The program allows users to sort subjects by name from a-z and z-a. o The program allows users to sort subjects by number of lesson in ASC order and DESC order. Tab Students o The program allows adding Students to the table. o The program allows users to view all Students information that has been added to the table.
o The program allows users to update all information (except ID) of any Students. o The program allows users to delete all fields on the form that they have filled out because of incorrect input to re-fill. o The program allows users to search for students information by approximate name. o The program allows users to search for students information by id.
o The program allows users to search for students information by major. o The program allows users to sort students by name from a-z and z-a. o The program allows users to sort subjects by id. Tab Registerings o The program allows adding Registerings to the table.
o The program allows users to view all Registerings information that has been added to the table. o The program allows users to update all information (except ID) of any Registerings. o The program allows users to delete all fields on the form that they have filled out because of incorrect input to re-fill. o The program allows users to search for Registerings information by approximate name.
o The program allows users to search for Registerings information by Student's name. o The program allows users to search for Registerings information by subscription time. Page 12 of 159 o The program allows users to sort Registerings by student's name from a-z and z-a. o The program allows users to sort Registerings by Early-late and Late-early registration time.
Tab Class division o The program allows to create classes with data taken from the subject registration table, student information and subject information. In order to fulfill the requirements mentioned above, I have decided to utilize Netbean tool as the development platform and employ the Java language along with Java Swing. This choice enables me to create high-quality solutions that align with the school's standards. Login and Register Users must register an account by email with the extension @fpt.
After registration is complete, users can log in with the previously registered account to access the system. Figure 1: Wireframe Sign up and login 2. Wireframe Homepage Page 13 of 159 a. Subject After entering the system, the user will see the subject management section: Figure 2: Wirfeframe tab Subject b.
Student The student tab is located next to the Subject section. When the user clicks on the student item, program will switch to the student management form. Page 14 of 159 Figure 3: Wireframe tab student c. Register The register tab is located next to the Student section.
When the user clicks on the register item, program will switch to the register management form. Page 15 of 159 Figure 4: Wireframe tab register d. Class division The Class division tab is located next to the Register section. When the user clicks on the Class division item, program will switch to the create Course form.
Page 16 of 159 Figure 5: Wireframe tab Class division IV. Program structure The diagram provided illustrates the architecture of my Java application developed with the assistance of netbean coding tools. I have employed the MVC (Model-View-Controller) pattern to ensure efficient code management and establish a logical flow of data within the program. This approach enables a cohesive execution of the program's functionalities.
Page 17 of 159 I divided the program into 5 main packages: model, view, controller, controller.sort and exception. The package model will contain classes that display data such as account, course, person, student, registering, and subject. Package View will be the place to display the user interface including the main form of the program. The Package Controller will be the place to control the flow of data, like the brain of the program, including the interfaces and the classes that implement them.