13 Pages
3217 Words
1. Introduction - COIT11134 Object-Oriented Programming
A Java Gui Application For Cquniversity Industry Placements
This report presents the development and testing of a Java GUI application as a part of the Object-Oriented Programming course. The application shows useful uses of several Java elements, for instance; as GUI parts, data structures, exception handling and file processing. It is designed to handle the processing of students for industry placement at CQUniversity. This project shows the ability to understand and apply all the concepts of object-oriented programming and acts as a proof of what has been learnt in the course.
Struggling with tight deadlines and complex assignments? New Assignment Help is here to support your academic journey. Our expert writers deliver top-quality Assignment Help services across the UK, helping students achieve their goals with confidence.
2. Project Overview
The perspective of usefulness and users’ interactions with the system, it is a great progress. Utilizers of the program are able to perform a number of significant functions related to the management of data pertaining to the students. Some of these features include registering new students, list of all the students in school, read the current information of a student from a file, writing new changes of a student’s information to the file system and saving it. But with the help of unique identifying numbers for each student, user can even make a search for a definite student(Song et al. 2021). The project respects simple principles of object-oriented programming while at the same time fully embracing modern application development paradigms, all due to the employment of JavaFX for the GUI elements. This method ensures the code is easily extent or changed in the future with a modular and maintainable code plus user friendly interface.
3. Main Functions Implementation
3.1 Adding New Student
The main classes which are responsible for different parts of the system include several parts of the application classes. Supervisor of the new students to the system is controlled by the AddStudentController class. All the possible input fields needed for the students’ identification, as well as course information user need that are available in the user interface of this course including the student ID, , campus, course code, units finished, GPA, etc(Lasminiasih et al. 2022). To ensure the quality of the data to be used, an effective data validation is incorporated in the design of the data input. The class only adds a new Student object in the main studentList as mentioned above if validation is successful. To enhance user-friendliness in the class, there is also an immediate feedback in the form of alert which confirms successful entries or where there are issues in the input.
3.2 Searching for Students
The ‘Search’ feature is provided by the SearchStudentController class that allows the users to find some specific students through their unique student identification number. This class is very simple in terms of usability and only includes a search button and a field that the user should enter the student’s ID. The entered ID is checked with each student’s ID when the search algorithm is cycling through all of the IDs in the studentList. If there’s a match then additional information related to the student is displayed in a text field. It is made possible to effectively communicate the user’s search results by making the program display an appropriate message when no corresponding student is found.
3.3 Viewing All Students
The main responsibility of the class is to handle all the presentations of the enrolled students and is the central controller of the application. This class iterates over the studentList and when the user types that he/she wants to view all students the class formats the student’s data into a readable string(Kaewsuwan and Khwunnak 2022). After then, this prepared data is shown in a text box appearing on the main menu and can be viewed by the consumers where all enrolled pupils are provided with a complete detail. To ensure that the users always get the feedback that can be of insightful information a specific message is posted in case the list is empty.
3.4 File Operations
The FileHandler, is responsible in both reading from files as well as writing to them. It also has file operations functionalities It also has file operations functionalities. The given current student list is then outputted to a text file with help of saveStudentsToFile() method that synchronizes students data and formatting. The vice versa process is done by the loadStudentsFromFile function which takes from a text file the student data and add the Student objects in the studentList. Through the intended bidirectional file handling, users are able to update the records in the files over a long time due to the durability of data in the application sessions.
4. Graphical User Interface (GUI) Design
4.1 Main Menu
Three main views that are related to the management of student data are incorporated into the application’s GUI design, which was achieved focusing on both functionality and usability. The first scene often designed for a convenient access to all the application’s primary functions is the Main Menu scene. There are buttons which include New student to capture more information about the student, All students to display information of every student in the system, Search student – this is used to look for specific student in the system, Save to save the application and Quit to end the application. When all records are seen, a large text area huddled in mid of the image displays student information. Due to practicality of the layout, the users can navigate to the function quickly and effortlessly.
4.2 Add Student Scene
The Add Student scenario is to minimize the difficulty of entering new data of students. It presents all required student information with input fields clearly labelled as Student ID, Name, Campus, Course code, credit(s) completed and GPA respectively. It also has buttons of submit, reset and cancel within this scene to enhance the usability of a form(Kai 2020). The buttons such as ‘submit’, ‘reset’ and ‘cancel’ allow the users to quickly clear the fields and go back to the main menu without recording any information; and the ‘submit’ button validates the data entry and records on the database.
4.3 Search Student Scene
Search Students gives a specific interface for searching Type specific student records. It carries an icon labelled ‘Search’ to initiate the search process in addition to a box into which the user would have to type in his/her student identification number. The results of the search are displayed as the information found about the student may be easily visible in a text field, or there can be message saying that there is no record matching the search done. This increases the chances of more visitors completing their search in the website after which they can easily go back to the main menu because of the conspicuous exit search button. Due to the implied design, the user can quickly find the information he or she needs and return to the main menu without needing to search again.
5. Data Validation and Integrity
Keeping accurate records of the student is therefore critical to the reliability and usefulness of the application. Thorough data checking is therefore used most of the time and particularly when registering new pupils. The validation checks relate to a number of significant components when it comes to students’ data. Before passing it to the system, there’s always a validation of the Student ID to ensure the ID number has eight digits. They ensure that there is no duplication in the identification system and also helps to maintain the integrity of the identification system. Due to the fact that the number of completed units in real-life learning scenarios cannot be an arbitrary real number, number of completed units is defined to lie in the set {1,2,…23,24}. Thus, GPA input is also being validated to assume the proper 0 – 7 range in order not to provide academically impossible results. These validation tests are done in the AddStudentController class in order to validate the user input before creating a new Student object. In case of violation of any of these validations, an alert window on the screen brings a message to the user, which explains in detail the type of mistake made(Trimal et al. 2024). This is done because the inputs can be corrected immediately and this not only improves the whole process of data entry but also reduces the chances of developing wrong entries in the system. The imperatives regarding the data entry of students’ records help maintain the application’s data integrity policy so that all entries the program processes in its database contain accurate and dependable information, which those restrictions enforce at the entry-level.
6. File Handling
To ensure that each student data is well stored between different sessions the program uses strong file I/O operation. The DataHandler class is responsible for this capability which links the file system with in-memory data structures. The studentList is created by first reading data from “students. txt” file in the data file using the readDataFile function. If the file is not existent or it is empty then the file is initialized with an empty list. To ensure that the data previously entered is not lost between sessions the current data is saved to “students. txt” using the saveData function on exit(Nafrees and Kariapper 2020). This feature is handy particularly when a user keeps on closing and opening an application time and again. The activities pertaining to file handling include capturing of exceptions, providing feedback to the user on read/write errors and the proper management of exceptions for potential I/O error. While ensuring the users of the fact that there can always be a problem when it comes to data persistence this method not only secures data persistence but also enhances the reliability and ease of use of the application.
7. Code Structure and Organization
The project follows a modular structure
the project is well structured and is an embodiment of the best practices of object-oriented design. The central part of the program is a java class, which can be considered as an entry point and is responsible for the management of all application’s actions. The subject being used in this model is the Student. java class, which encompasses all the attributes and behaviours concerning the record of a student. The addition of functionality related to the students in the future will be possible along with easier maintenance of the application due to the distinct dissection of the data model from the rest of the components.
Controller classes
The application is primarily oriented to the controller classes which include, among others, MainMenuController. java, AddStudentController. java, and SearchStudentController. java. Each controller is responsible for the management of the user explicitly for a given scene together with the flow of data. By elimination of concern, every segment of the program is ensured that it will be solely responsible for a single and specific function making it easy to comprehend and also to manage the program(Akinola et al. 2021). The DataHandler. java class which is in charge of data access to from and to the file system defines how student data will be written or read to/from the file system. Having this concentrated the logic for processing data it becomes easier to optimize or retrofit the data persistence aspects of the application at some later point in time.
FXML files for scene layouts
The graphical user interface is developed in the FXML files and it includes addStudent. fxml, searchStudent. fxml, and mainMenu. fxml. These files contain descriptions of the elements and layout of scenes thus helping to separate the logical functionalities of an application from its look(Ujakpa et al. 2022). As a result, there is convenience in changing the look of the interface while not affecting the performance deep down.
8. Testing and Screenshots
In order to ensure that results observed can be considered accurate and the application can be used in differing environments, testing was carried out. Even the finer details of the critical properties and the peculiarities of the program’s functioning were checked in terms of how they worked in various situations. By capturing screens at some point, documenting the action performed on the program and look and feel of the program is achieved easily.
Test ID |
Test Description |
Input |
Expected Result |
Actual Result |
Status |
1 |
Verify student ID input validation |
"12345678" (valid), "1234567" (invalid) |
Accept valid ID, show error for invalid ID |
Passed |
Pass |
2 |
Verify unique student ID check |
Add "12345678" and then "12345678" again |
Show error for duplicate ID |
Passed |
Pass |
3 |
Validate input |
"John Doe" |
Accept |
Passed |
Pass |
4 |
Validate campus input |
"Main Campus" |
Accept campus |
Passed |
Pass |
5 |
Validate course code input |
"CS101" |
Accept course code |
Passed |
Pass |
6 |
Validate units completed input |
10, -1, 25 |
Accept 1-24, show error for out of range |
Passed |
Pass |
7 |
Validate GPA input |
3.5, -1, 8 |
Accept 0-7, show error for out of range |
Passed |
Pass |
8 |
Check student addition functionality |
Valid inputs for all fields |
Student added successfully |
Passed |
Pass |
9 |
Verify reset functionality |
Fill in fields, click reset |
All fields cleared |
Passed |
Pass |
10 |
Check cancel button functionality |
Click cancel |
Return to main menu |
Passed |
Pass |
11 |
Verify data saving functionality |
Add student, click save/exit |
Data saved to "students.txt" |
Passed |
Pass |
12 |
Verify data loading functionality |
Application startup |
Students loaded from "students.txt" |
Passed |
Pass |
13 |
Check search functionality |
Valid and invalid student IDs |
Show student info for valid ID, error for invalid |
Passed |
Pass |
14 |
Validate display of all students |
Click view all |
Display all students in text area |
Passed |
Pass |
15 |
Check application exit functionality |
Click save and exit |
Application closes successfully |
Passed |
Pass |
![Screenshot of Main Menu Screenshot of Main Menu]()
Figure 1: Screenshot of Main Menu
(Source: Self-Created in NetBeans)
It is the screenshot of primary items of the application mainly the main focus that access is given to all the primary features of the application. In this picture the layout and style of the main user interface are visible.
![Screenshot of Student Adding window Screenshot of Student Adding window]()
Figure 2: Screenshot of Student Adding window
(Source: Self-Created in NetBeans)
Before and after data entry, student’s forms were collected using Both. These pictures demonstrate how the form looks when filled with data as well as the fields to input students’ data.
![Screenshot of searching Student Screenshot of searching Student]()
Figure 3: Screenshot of searching Student
(Source: Self-Created in NetBeans)
All the records in Search Student form, irrespective of whether the search was successful or not, are depicted in the print screens of the form(Aditya et al. 2024). These variables illustrate the manner in which the application presents student records which have been either identified or a comment in case no records are found.
![Screenshot of viewing all student lists Screenshot of viewing all student lists]()
Figure 4: Screenshot of viewing all student lists
(Source: Self-Created in NetBeans)
After adding several records, one is able to use the “View All Students” feature as illustrated in the screenshot below(Aziz 2021). It enables one to review all enrolled students and confirm that every data entry, display, and format is accurate.
![Screenshot of Error Message Screenshot of Error Message]()
Figure 5: Screenshot of Error Message
(Source: Self-Created in NetBeans)
Notification of Error for Invalid Input Pictures of dialog boxes with messages of entered data, which is not right were captured(Batra et al. 2020). It is seen from these examples that the program pops up a message at the user when the input validation is unsuccessful, for instance the unit counts are out of degree, or the ‘GPA’ is not a number.
![Screenshot of success message after adding new student Screenshot of success message after adding new student]()
Figure 6: Screenshot of success message after adding new student
(Source: Self-Created in NetBeans)
Success Notification Implementations show the notifications displayed at the end of Adding a student action. In these illustrations the primary goal of the application is depicted as making sure that a specific activity has been completed.
9. Challenges and Solutions
Effective search, managing and maintaining the data integrity, and the issue of storing the data in a persistent manner was most challenging goal of the project. In AddStudentController class, data integrity was performed using strong inputs. Value ranges were utilized in conditional checking while try and catch blocks were utilized for the conversion of string values to numeric values. It also effectively reduced the risk of keying in wrong data as was the case with the previous strategy (Daram et al. 2023). In this way the problem with search mechanism was solved and by having a studentList in MainMenuController the fast iteration and search in SearchStudentController was achieved. Besides the fact that the site provides a responsive user experience, this approach creates a basis for further enhancements (Bailey and Fu 2021). The class d FileHandler was created with the intention of dealing with issues involving storage management of files by regulating operations involving files and errors. This ensures that all file handling problems and file integrity between the sessions are adequately addressed without hitches.
10. Conclusion
The project demonstrates software development such as object-oriented approach, file I/O operations, error handling, and JavaFX GUI development. As a result, the use of Model-View-Controller architecture leads to the creation of a codebase that is modular while also being highly maintainable, which demonstrates the comprehensions of modern design principles. The system then contains a feature that enables collection and management of student data records which have provisions for file-based data storage and the functions of recording, editing and searching records. It is very beneficial in educational-setting, as it guarantees the accuracy of the information and the stability of the source throughout years due to the strong file management and data verity. The project meets all specifications and therefore future development is plausible. Some of these are generalized search capabilities such as search or course code search to make the system mimic real-life application, data management capabilities especially with the large data sets to manage and organize data, and the presence of a user authentication feature to enhance on the security of programs that may include sensitive information.
Reference List
Journals
- Song, S., Isican, I. and Fu, Y., 2021, July. Research and implementation of student management system based on java EE technology. In International Conference on Frontier Computing (pp. 1621-1625). Singapore: Springer Nature Singapore.
- Lasminiasih, L., Saputra, G.E., Utomo, R.B. and Wiseno, E., 2022. Using Prototyping Method For Analysis And Design Of Information Systems For Student Registration In Sekolah Master. International Journal Science and Technology, 1(2), pp.19-29.
- Kaewsuwan, S. and Khwunnak, C., 2022. The Development of Web-Based Application of Registration System. Engineering Access, 8(1), pp.101-105.
- Kai, Z., 2020. Design and Analysis of Campus Dormitory Management System Based on Java. The Frontiers of Society, Science and Technology, 2(17).
- Trimal, M.S., Shaikh, M.Z., Chavan, M.A. and Kamble, S.M., 2024. STUDENT MANAGEMENT SYSTEM. Open Access Repository, 10(6), pp.116-119.
- Nafrees, A.C.M. and Kariapper, R.K.A.R., 2020. Application of online management information system to the examination department, state universities in Sri Lanka. Journal of Critical Reviews, 7(12), pp.4703-4712.
- Akinola, O.A., Olopade, S.O. and Afolabi, A.S., 2021. Development of mobile and desktop applications for a fingerprint-based attendance management system. Indones. J. Electr. Eng. Comput. Sci, 24(1), pp.570-580.
- Aditya, D., Widodo, E. and Sulaeman, A.A., 2024. Implementation of a New Web-Based Student Admission Information System at Smp Pelita Nusantara Using the Rapid Application Development (Rad) Method. Indonesian Journal of Business Analytics, 4(3), pp.787-798.
- Batra, P., Goel, N., Sangwan, S. and Dixit, H., 2020. Design and implementation of hostel management system using Java and MySQL. LC International Journal of STEM (ISSN: 2708-7123), 1(4), pp.63-74.
- Daram, P.K., Gopu, J.R. and Fiaidhi, J., 2023. Student Registration System using Java Server Faces. Authorea Preprints.
- Bailey, B.M. and Fu, Y., 2021, July. From UML Design to Implementation of a Reliable Student Information System. In 2021 ASEE Virtual Annual Conference Content Access.
- Aziz, A.A., 2021. Design architecture of an integrated student activities management system for higher education. Turkish Journal of Computer and Mathematics Education (TURCOMAT), 12(5), pp.1676-1683.
- Ujakpa, M.M., Mutalya, M.N., Osakwe, J., Iyawa, G. and Shililifa, E.N., 2022, May. School Management Information System (SMIS) for the Elite College. In 2022 IST-Africa Conference (IST-Africa) (pp. 1-7). IEEE.
Author Bio
It's been more than 5 years in academic writing and I have completed plenty of Computer Science papers. I can work with Java Script, Python, C++, PHP, SQL, Ruby and other programming languages. You can have my support and guidance for your Computer Science assignments, dissertation, etc. I understand all your details and work efficiently on the task.