Assignment for Java Programming PROG191, Assignments of Java Programming

Assignment for Java Programming PROG191

Typology: Assignments

2021/2022

Available from 07/29/2022

tri-minh-1
tri-minh-1 🇻🇳

4.7

(144)

36 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Submission date
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Phan Minh Tri
Student ID
GCD201632
Class
GCD0904
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
Grading grid
Grade (0-10)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Assignment for Java Programming PROG191 and more Assignments Java Programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Phan Minh Tri Student ID GCD Class GCD0904 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 Grading grid Grade (0-10)

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date: IV Signature:

Table of Contents

  • I. Introduction and Requirement
  • II. User requirement...................................................................................................................................................
  • III. UI Design
  • IV. Implementation
      1. Explain program structure.................................................................................................................................
      1. Explain classes
      1. Explain important algorithms
      • 3.1. Adding Student
      • 3.2. Delete Student
      1. Errors handled
  • V. Test (test plan, log, result)...................................................................................................................................
      1. Test plan..........................................................................................................................................................
      1. Test log
      1. Result
  • VI. Result
      1. Adding function
      1. Update function...............................................................................................................................................
      1. Delete Function
      1. Search Function
  • VII. Conclusion

I. Introduction and Requirement

❖ A vocational training facility has several challenges in managing students yet prefers to save student information on paper, which is a waste of time. So, they recruited me to create a student management program to assist them in managing their student information. Many crucial criteria must be met by the program, such as a graphical user interface, the ability to read and write student data from a file, and the ability to interact with data gathering (item search). Also, test the application before deploying to ensure that the issue is not on the end-user side.

II. User requirement

❖ The software is desired to manage student with their properties:

  • ID
  • Full Name
  • Gender
  • Grade ❖ Software’s functions:
  • Create: Save the information of student
  • Read: Display the information has saved
  • Update: Update the information of student
  • Delete: Delete the information of student
  • Find the information by reading their properties

III. UI Design

❖ Wireframe of student management software:

IV. Implementation

1. Explain program structure ❖ When the application starts, the view shows, and the 'ReadDataFromFile' function is called, with its function sending data from file to list and the data being passed into the 'ArrayList', then the data from the 'Database' file is passed into the 'ReadFile' function.

  • Text field of id, name, gender, and grade: to get text for handling.
  • Radio button of choosing genders
  • Button: Add, Delete, Update, Search
  • Table to display the information of students

❖ When a user interacts with a view, the view receives user actions such as adding, deleting, and updating. The view also has the mission to receive data through text fields such as id and name text fields. The data is passed into the view, followed by the controller, and given to a specific function to handle, after which the handled data is passed into the 'ArrayList' and transferred to the 'WriteToFile' function to write or override them into the 'Data The 'Database' file is then read by the 'ReadFile' function, and the data according to the user's need is returned to the display.

2. Explain classes ❖ Student class contains field (ID, Name, Gender, Grade), constructors, getter and setter functions.

❖ MainFrame is a place we can use to design the interface for the application easily

3. Explain important algorithms

3.1. Adding Student

❖ Flowchart ❖ Explanation:

  • Student Information represent for id, name, gender, and grade
  • Check Information for student is duplicate or valid ❖ When a user wants to add a new student, they must enter that student's information; if the information is missing, the computer will warn the user and require them to provide it. The program then receives that information and checks it to see if it is unique or valid; if not, the program will force the user to enter the information again until it is unique and valid; once everything is correct, the program will process it by adding it to an array list and writing that array list to file.

4. Errors handled ❖ I have created ID, Name and Grade check function to check user input data. If the user enters correctly, the data will be saved to the file and displayed in the table. If the user enters it wrong, the program will report an error and ask the user to re-enter it correctly

❖ When I added a student to the table, everything went as expected. ❖ When I enter invalid value into application, there is a warning dialog is showed on the screen. In the picture below, ID must be a number, name is a string and grade is only the value that has set before (P, M, D)

  • After checking the value of ID and Name, the program will check the last value is Grade and also show Error Dialog if the value is wrong format

 If user entered valid value, the program would save them to file and show in the table below.

6 Update student information which duplicates with another information in the database 7 Update student information by the new invalid student information 8 Search student’s id which is available in database file 9 Search student’s id which is not available in database file

2. Test log Test case ID Plan Procedure Expected Result Actual Result 1 Add student with valid information Type valid information Click ‘Add’ button Student will be added on ‘Database’ file and table

PASSED

2 Add student with invalid information Type invalid information Click ‘Add’ button The program will give the alert until user typing the valid information

PASSED

3 Delete student Choose student need to be deleted by enter ID student need to be deleted. Click ‘Delete’ button Student will be deleted from table and ‘Database’ file

PASSED

4 Delete student who doesn’t exit Click ‘Delete’ button The program will give the alert until user enter exist ID in database file

FAILED

5 Update student information by the new valid student information Choose student needing to be updated by enter their ID. Fill other valid information and click ‘Update’ Button Student will be updated their information on ‘Database’ file and table

PASSED

6 Update student information which duplicates with another information in the database Choose student needing to be updated by enter their ID. Fill other valid information and click ‘Update’ Button The program will give the alert until user types of the valid information that is not duplicate with another id on the table and ‘Database’ file

FAILED

7 Update student information by the new invalid student information Choose student needing to be updated by enter their ID. Fill other invalid information and click ‘Update’ Button The program will give the alert until user type the valid information

PASSED

8 Search student’s id which is available in database file Type student ID which is available in ‘Database’ file to search Click ‘Search’ button Only student has that ID will be appeared on the table

PASSED

9 Search student’s id which is not available in database file Type student Id which is not available in ‘Database’ file to search Click ‘Search’ button There will be nothing on the table

PASSED

3. ResultTest case 1 : Add student with valid information  Adding successfully