You are on page 1of 22

Higher Nationals in Computing

JAVA PROGRAMMING
ASSIGNMENT
No.1/1

Learner's Name: LE HUU KHUONG

Assessor Name: NAM LAM

Class: GCS0903B
ID: GCS200071
Assignment due: 1 1 M a r c h 2 0 2 2
Assignment submitted: 1 1 M a r c h 2 0 2 2

Page 1
ASSIGNMENT FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title JAVA PROGRAMMING

Submission date March 11th, 2022 Date Received 1st submission March 11th, 2022

Re-submission Date Date Received 2nd submission

Student Name Le Huu Khuong Student ID GCS200071

Class GCS0903B Assessor name Nam Lam

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 KHUONG

Grading grid
Grade (0-10)

Page 2
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

IV Signature:

Page 3
Assignment Brief
Student Name/ID Number: Le Huu Khuong / GCS200071
Unit Number and Title: Object-Oriented Programming with Java
Academic Year: 2022
Unit Assessor: Nam Lam
Assignment Title: Design, Implement and Test a GUI application
Issue Date:
Submission Date: 11 March, 2022
Internal Verifier Name:
Date:

Submission Format:
The submission is in the form of a written report. This should be written in a concise, formal business
style using single spacing and font size 12. You are required to make use of headings, paragraphs and
subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system.

Unit Learning Outcomes:


LO1 Understand basic programming skills and OOP paradigm
LO2 Understand how to detect errors and handle errors
LO3 Understand how to working with files in applications
LO4 Understand how to build GUI application
Assignment Brief:
You have to develop an application to solve a small business problem. The problem requires a
graphical user interface with features that required reading / writing data from text file, working with
a collection of data (searching for item / min / max / sum / etc.). The application must handle errors so
that it will not crash at end user side. The application also need to be fully tested before the production
phase.
You need to write a technical report about the development of the application. Content of the report
should cover design, implementation and testing.
In the end you need to demo your application, explain your code and answer technical questions.

Page 4
Learning Outcomes and Assessment Criteria

LO1 Understand basic programming skills and OOP paradigm


LO2 Understand how to detect errors and handle errors
LO3 Understand how to working with files in applications
LO4 Understand how to build GUI application

To get Pass (5 – 6.5 points)


- Student can design and implement GUI for the application solve a specific problem
- Student knows how to load and save data from file.
- Student knows how to handle errors by using exceptions
- Student knows how to write test plan, execute test cases and log results.

To get Merit (7 – 8.5 points)


- The application is well designed, user friendly and has logical flow of actions.
- Can apply MVC in the application, can apply JUnit to test automatic
- Errors are well handle to avoid program crashing, the test can cover as many as possible the errors
in program

To get Distinction (9 – 10 points)


The application must show excellent design & implementation, runs without any errors, all inputs
are validated, all errors are well handled including recover choice, rich features showing unique
ideas, algorithms.

Page 5
Table Of Contents
I. Introduction .................................................................................................................. 7
II. Requirement.................................................................................................................. 8
1. Functional requirements ............................................................................................................... 8
2. Non-functional requirements ........................................................................................................ 8
3. Use Case Diagram ......................................................................................................................... 8
III. UI design ........................................................................................................................ 9
IV. Implementation ........................................................................................................... 12
V. Test............................................................................................................................... 19
VI. Conclusion ................................................................................................................... 21
VII. Reference ..................................................................................................................... 21

Table Of Figures
Figure 1: Employee Manager...................................................................................................................... 8
Figure 2: Employee Information ................................................................................................................. 9
Figure 3: Notification ................................................................................................................................. 9
Figure 4: Employee Salary ....................................................................................................................... 10
Figure 5: Wrong format input ................................................................................................................... 10
Figure 6: Staff List ................................................................................................................................... 11
Figure 7: Get and check input data ............................................................................................................ 12
Figure 8: Class Employee ......................................................................................................................... 13
Figure 9: Load and Save Data ................................................................................................................... 14
Figure 10: Previous Button and Next Button ............................................................................................. 15
Figure 11: Default Interface ...................................................................................................................... 16
Figure 12: Create New Employee ............................................................................................................. 17
Figure 13: View Employees...................................................................................................................... 18
Figure 14: Wrong ID Format .................................................................................................................... 19
Figure 15: Load Data................................................................................................................................ 20
Figure 16: Save Data ................................................................................................................................ 20

Page 6
I. Introduction
I currently work as an IT specialist for a multinational firm. My company has just invested
in a modest start-up in the entertainment content production industry. Because this start-up was
formerly a tiny business, when it was acquired and expanded, it ran into issues with human
resource management. I was hired to assist in the development of an HR management program.
In this report, I will detail the entire design and development process for this application.

Page 7
II. Requirement
1. Functional requirements
• The system should allow the manager to add, edit, remove employees.
• The system should allow the manager to search for employee information.
• The system should allow the manager to make revenue statistics.
• The system should allow the manager to save or load the data.
2. Non-functional requirements
• All employee details would be kept private.
• The system can run on multiple devices.
• The system should distinguish between U.S. currency and currency from other nations.
• The application must load in 2 seconds.
• The system should be able to integrate with the existing inventory system.
3. Use Case Diagram
The use case diagram is below. The critical features evaluated and implemented include adding new
employees, searching for infomation about the employee, calculating the sales. The manager can add, edit,
and remove employees and make statistical sales.

Figure 1: Employee Manager

Page 8
III. UI design

Figure 2: Employee Information

Figure 3: Notification
Page 9
Figure 4: Employee Salary

Figure 5: Wrong format input

Page 10
Figure 6: Staff List

Page 11
IV. Implementation
Several screenshots of the MAIN source code:
This code is used to get user input data for creating new employees and declare successful employee
creation. The code has added an input control function in the employee ID entry.

Figure 7: Get and check input data

Page 12
This employee class is used to store the information of the employees. This class can be called anywhere
in the project to create a new employee's information by using the Object.

Figure 8: Class Employee

Page 13
The following code is created for two purposes: getting data from the file into the program (including
displaying it outside the application) and saving all the data after the job is done.

Figure 9: Load and Save Data

Page 14
The following code is attached to the Previous and Next buttons. When the user clicks the Previous
button, the system will display the information of the before employee. On the other hand, when clicking the
Next button, the system will display the information of the after employee.

Figure 10: Previous Button and Next Button

Page 15
Several screenshots of the application:
This is the default interface every time the application is launched. The manager can create a new
employee by filling in all the information in the Text Field and then clicking create.

Figure 11: Default Interface

Page 16
Every time the manager creates an employee successfully, a notification window will appear and display
information about the employee that has been created.

Figure 12: Create New Employee

Page 17
By clicking Next or Previous, the user can continuously view the employees already in the system.

Figure 13: View Employees

Page 18
V. Test
When the user enters the character in the ID and clicks Create. The system will notify it as an
inappropriate character and ask the user to re-enter it.

Figure 14: Wrong ID Format

Page 19
Every time the user opens the application, they need to load the data by File/Load All Employee Data.

Figure 15: Load Data

Every time the user closes the application, they need to save the data by File/Save All Employee Data.

Figure 16: Save Data

Page 20
VI. Conclusion
The report body part includes all the steps from design, coding and testing. Variable names are set
according to clearly identifiable rules. The program works well, full features based on user requirements.
Simple design suitable for users.
The report section also includes clear comments that help programmers working with this program can
easily maintain and upgrade in the future.
VII. Reference
[1] beginnersbook.com. (2017). Java - Convert LocalDate to Date. [ONLINE] Available at:
https://beginnersbook.com/2017/10/java-convert-localdate-to-date/. [Accessed 08 March 2022].
[2] Stack Overflow. (2015). How to get date value from jspinner - Stack Overflow. [ONLINE] Available
at: https://stackoverflow.com/questions/31189811/how-to-get-date-value-from-jspinner. [Accessed 08
March 2022].
[3] Usability.gov. (2022). User Interface Design Basics | Usability.gov. [ONLINE] Available at:
https://www.usability.gov/what-and-why/user-interface-design.html. [Accessed 10 March 2022].
[4] Wikipedia. (2022). Software testing. [ONLINE] Available at:
https://en.wikipedia.org/wiki/Software_testing. [Accessed 10 March 2022].
[5] V1Study. (2022). Java: Cách sử dụng ButtonGroup | V1Study. [ONLINE] Available at:
https://v1study.com/java-swing-cach-su-dung-buttongroup.html. [Accessed 10 March 2022].
[6] Guru99. (2022). What is a Functional Requirement in Software Engineering? Specification, Types,
Examples. [ONLINE] Available at: https://www.guru99.com/functional-requirement-specification-
example.html. [Accessed 10 March 2022].
[7] Wikipedia. (2022). Functional requirement. [ONLINE] Available at:
https://en.wikipedia.org/wiki/Functional_requirement. [Accessed 10 March 2022].
[8] Wikipedia. (2022). Non-functional requirement. [ONLINE] Available at:
https://en.wikipedia.org/wiki/Non-functional_requirement. [Accessed 10 March 2022].
[9] Visual Paradigm. (2022). What is Use Case Diagram?. [ONLINE] Available at: https://www.visual-
paradigm.com/guide/uml-unified-modeling-language/what-is-use-case-diagram/. [Accessed 10 March
2022].
[10] Lucidchart. (2022). UML Use Case Diagram Tutorial. [ONLINE] Available at:
https://www.lucidchart.com/pages/uml-use-case-diagram. [Accessed 10 March 2022].
[11] Performance Validation. (2018). User Requirements - Performance Validation. [ONLINE] Available
at: https://perfval.com/user-requirements/. [Accessed 10 March 2022].
[12] IBM. (2022). What is Software Testing and How Does it Work?. [ONLINE] Available at:
https://www.ibm.com/topics/software-testing. [Accessed 10 March 2022].

Page 21
[13] WalkMe™. (2022). What Is Software Implementation in Business?. [ONLINE] Available at:
https://www.walkme.com/glossary/software-implementation/. [Accessed 10 March 2022].
[14] OpenText Blogs. (2022). What is software implementation?. [ONLINE] Available at:
https://blogs.opentext.com/what-is-software-implementation/. [Accessed 10 March 2022].
[15] Software Advice. (2022). 5 Critical Steps for Your Software Implementation Plan. [ONLINE]
Available at: https://www.softwareadvice.com/resources/software-implementation-plan/. [Accessed 10
March 2022].

Page 22

You might also like