Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title

Date Received 1st


Submission date 19/4/2023
submission
Date Received 2nd
Re-submission Date
submission

Student Name Nguyen Luu Bao Phuc Student ID GCD210392

Class GCD1101 Assessor name Pham Thanh Son

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 Phuc


Grading grid

Grade (0-10)
❒Summative Feedback: ❒Resubmission Feedback:

Grade: Assessor Signature: Date:


IV Signature:
Table of contents
I. Introduction ................................................................................................................................................................................................. 5
II. Requirment .............................................................................................................................................................................................. 5
III. UI Design .................................................................................................................................................................................................. 5
IV. Implement ................................................................................................................................................................................................ 6
1. Explain program structure .......................................................................................................................................................................... 6
3. Explain important algorithms: .................................................................................................................................................................... 9
4. Explain how to handle errors .................................................................................................................................................................15
V. Test ..............................................................................................................................................................................................................19
VI. Result .......................................................................................................................................................................................................24
VII. Conclusion ...............................................................................................................................................................................................25
Table of figures

Figure 1: Wireframe .............................................................................................................................................................................................. 6


Figure 2: Program structure ................................................................................................................................................................................... 7
Figure 3: Manga class (1) ....................................................................................................................................................................................... 8
Figure 4: Manga class (2) ....................................................................................................................................................................................... 9
Figure 5: Add (Create) function .............................................................................................................................................................................10
Figure 6: Load (Read) function ..............................................................................................................................................................................11
Figure 7: Edit(Update) function.............................................................................................................................................................................12
Figure 8: Delete function ......................................................................................................................................................................................13
Figure 9: Save (Write) function .............................................................................................................................................................................14
Figure 10: Search function ....................................................................................................................................................................................15
Figure 11:Notify when the user does not fill in the information ............................................................................................................................16
Figure 12: Fig 11 code ...........................................................................................................................................................................................17
Figure 13: Notification when user enters incorrect data type ................................................................................................................................17
Figure 14: Fig 13 code ...........................................................................................................................................................................................18
Figure 15: Screenshots of running program ..........................................................................................................................................................24
I. Introduction
The writer 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.
The writer 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 the writer need to demo The writerr application, explain code and answer technical questions.
II. Requirment
1. Graphical User Interface: The application must have a user-friendly interface to allow the end-user
to interact with the application easily.
2. Reading and Writing Data: The application must be able to read and write data from a text file to
allow the end-user to manage the data effectively.
3. Collection of Data: The application must work with a collection of data and include features such
as searching for player, Delete and Update old data.
4. Error Handling: The application must handle errors effectively to ensure that it does not crash at
the end-user side and provide a smooth user experience.
5. Testing: The application must be fully tested before the production phase to ensure that it meets the
required standards and is error-free.
III. UI Design
Figure 1: Wireframe

IV. Implement
1. Explain program structure
The program is universally designed with 2 main Java files. In which 1 file contains the design form
and 1 file contains application property data.

Figure 2: Program structure

2. Explain classes
a. MainFrame class:
This class will contain all the functions created with java swing. Functions will be implemented
through user interactions.
b. Manga class:
This class contains the properties of the manga.
Figure 3: Manga class (1)
Figure 4: Manga class (2)

3. Explain important algorithms:


a. Create:
The create feature is executed when the user clicks the add button after entering the information.
When the user does not fill in the necessary information as well as when the correct data type is not
entered, the program will notify.
Figure 5: Add (Create) function

b. Read:
The read feature is executed when the user uses the load button. The program will read the txt file
available in the folder. In case the file is not available, the program will report an error.
Figure 6: Load (Read) function

c. Update:
The update feature is executed when the user uses the edit button. After the user selects a row to
update the information, the user will enter the information and then click Edit. That item will be
updated. If the user does not select a row, the system will ask the user to select a row before
editing.
Figure 7: Edit(Update) function

d. Delete:
The delete feature is executed when the user uses the delete button. The user selects a row and then
presses the Delete button. The program will delete the data of that row from the table.
Figure 8: Delete function

e. Save
After the user is finished using it, they can press the save button to save the table, the program will
save the table as a txt file.
Figure 9: Save (Write) function

f. Search function
Users can enter search information with the search tool in the lower corner of the program. When
entering the table, it will filter out the record and display the relevant record.
Figure 10: Search function

4. Explain how to handle errors


When the user enters incorrect or missing information, the application will give a warning with a
message box warning the user to enter incorrect data.
Figure 11:Notify when the user does not fill in the information
Figure 12: Fig 11 code

Figure 13: Notification when user enters incorrect data type


Figure 14: Fig 13 code
V. Test

No Test case Input Result Status


1 Check Add Pass
( create )
function
2 Check Edit Pass
( Update )
function

3 Check Pass
Delete
function

4 Check Pass
Save
function
5 Check Pass
Load
(Read)
function

6 Check Pass
Search
function

7 Check if Pass
the user left
the
information
blank
8 Check if Pass
user
entered
wrong data
type

9 Check if Pass
user tries to
delete
when there
is no data
in the table
10 Check if Pass
user tries to
edit when
there is no
data in the
table

Table 1: Test case


VI. Result

Figure 15: Screenshots of running program


VII. Conclusion
Everything in this report is for learning purposes only.

All source code in this github link: https://github.com/BrownKumano/ASM-real-2

You might also like