PROG191- Java Programming, Assignments of Java Programming

PROG191- Java Programming Pass

Typology: Assignments

2022/2023

Uploaded on 03/24/2023

andrew-2709
andrew-2709 🇻🇳

4.8

(20)

33 documents

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Higher Nationals in Computing
Unit 9: Java Programming
FINAL REPORT
Assessor name: LE NGOC THANH
Learner’s name:
ID:
Class:
Subject code: PROG191
Assignment due: Assignment submitted:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

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

Higher Nationals in Computing

Unit 9 : Java Programming

FINAL REPORT

Assessor name: LE NGOC THANH

Learner’s name:

ID:

Class:

Subject code: PROG

Assignment due: Assignment submitted:

ASSIGNMENT FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Java Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class Assessor name Le Ngoc Thanh 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 P5 P6 P7 M3 M4 M5 M6 D3 D

Assignment Brief (RQF)

Higher National Certificate/Diploma in Business

Student Name/ID Number: Unit Number and Title: Java Programming Academic Year: 2022 – 2023 Unit Assessor: ThanhLN Assignment Title: Design, Implement and Test a GUI application Issue Date: Submission Date: Internal Verifier Name: Date: Submission Format: Format: ● The submission is in the form of 1 document. ● You must use the Times font with 12pt size, turn on page numbering; set line spacing to 1.3 and margins to be as follows: left = 1.25cm, right = 1cm, top = 1cm, bottom = 1cm. Citation and references must follow the Harvard referencing style. Submission: ● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor. ● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/. ● Remember to convert the word file into PDF file before the submission on CMS. Note: ● The individual Assignment must be your own work, and not copied by or from another student.

● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. ● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this requirement will result in a failed assignment. 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.

Table of Contents

  • 1 INTRODUCTION.
    1. REQUIREMENT.
    1. UI DESIGN.
    • 3.1. LOGIN PAGE:
    • 3.2. HOME PAGE SYSTEM:
    1. IMPLEMENTATION.
    • 4 .1. EXPLAIN PROGRAM STRUCTURE:
    • 4 .2. EXPLAIN CLASSES:
    • 4 .3. EXPLAIN IMPORTANT ALGORITHMS:
    • 4 .4. EXPLAIN HOW TO HANDLE ERRORS:
    1. TEST (TEST PLAN, LOG).
    • 5.1. TEST PLAN:
    • 5.2. TEST LOG:
    1. RESULTS.
    1. CONCLUSION.
  • REFERENCES

P a g e | 1

ASSIGNMENT ANSWERS

1. Introduction. The management of students at a university is extremely challenging, yet the institution chooses to keep student data on paper, which is inefficient. They hired me to develop a student management tool that would help them manage their student data. The program must satisfy a number of crucial requirements, including having a graphical user interface, enabling students to read and write data from files, and enabling them to engage with the data collecting. Moreover, test the application before deployment to ensure that the issue is not with the end user. And all flaws must be fixed before the product is delivered to the consumer.

2. Requirement. There are some requirements from the University, that is system must have some functional requirement such as: Adding new Students, Deleting Students, Editing information about students, Saving students’ information to a file, and Load student information from a file. This report will help to use the minor student's management system:

  • The software has a login function and users need to log in to be able to use the student management software.
  • The user must be able to read and modify any files containing the application's data.
  • The software wants to manage students with the following attributes: ID (auto increment), Full Name, Age, Address, and Grade.
  • Software functions: Add new students, Display all student information added to the system, Edit student information, and Delete all student information from the system. 3. UI design. List of wiredframes: In order to structure content and functionality on a website while taking into account user requirements and user journeys, a wireframe is frequently utilized. Before adding visual design and content to a page, the basic structure of the page is defined using wireframes early in the development process. The interface design is constructed in this project before any code is done, as it should be. The following graphic shows how the project will look once the coding process is finished. These are some wireframes that I designed myself before making the system and after starting to design the system, it may have some functions that are different from these wireframes.

P a g e | 3 3.2. Home page system: Figure 2: Home page system wireframe No Item Description Constraints 1 ID box User can use it to enter student ID Can only use numbers (programmed to automatically add numbers) 2 FullName box Users can use it to enter their student names. At least 1 character and most 100 characters 3 Address box Users can use it to enter their addresses. At least 1 character and most 100 characters 4 Grade box Users can use it to enter their Grades. Can only use numbers 5 Add button Users can use it to add new students to the system. Just one click

P a g e | 4 6 Edit button Users can use it to edit student information in the system. Just one click 7 Update button Users can use it to update student information in the system. Just one click 8 Delete button Users can use it to delete student information in the system. Just one click A brief explanation of the program structure:

  • The system has a login section: a Username box, a Password box, and a Login button.
  • The system home page includes the FullName box, ID box, Address box, Grade box, and Add, Edit, Update, and Delete buttons.
  • Add: After the user has finished entering the student's information, press the add button to save the student's information into the system.
  • Edit: The user selects the student to change, the changed information clicks the edit button, and the information will be updated.
  • Update: Users can update necessary information about employees in the system.
  • Delete: The user selects a student and then clicks delete, that student will be deleted from the system. 4. Implementation. 4 .1. Explain program structure: I use Eclipse software to design and build the system through Java Programming. I apply the MCV design model to design the interface and the functions included in the system. The system after completion will have some modifications, different from the original wireframe design.

P a g e | 6

  • Package asm.qlsv.view is included in Flood V (view).
  • LoginView.java class is created using the LoginView.java class.
  • A student management screen is created using the StudentView.java class.
  • The LoginController.java class handles events from LoginView.java in Flood C (Controller) , which also includes the package asm.qlsv.controller.
  • The StudentView.java class's events are handled by the StudentController.java class. Other files:
  • The FileUtils.java class is used to read and write files.
  • The main function to start the application is contained in the App.java class.
  • The student list is kept in the student.xml file. 4 .2. Explain classes: This is the class that houses the method that starts the system's login component. Since it is linked to the process responsible for login and account verification, the login window will be shown first. Figure 4: Classes in my system (Source Code)

P a g e | 7 This is the class that contains the method of the system's login component. Because it is used to design the interface of the login section through the code about the location, components, and coordinates for this part. Figure 5: Classes in my system (Source Code)

P a g e | 9 This is the class that contains the method of the system's homepage component. Because it is used to run and perform user operations after entering data and the entered data will be stored through the student.xml file. Figure 7: Classes in my system (Source Code)

P a g e | 10 Here are the class methods to initialize the login part of the system and the method to store the Username and Password (preset). Figure 8: Classes in my system (Source Code) 4 .3. Explain important algorithms: The information for the student must be entered when adding a new student; if the information is missing, the computer will prompt the user to enter it. When the user enters the information a second time to make it unique and valid, the program forces them to enter it again. Once everything is correct, the program processes the information by adding it to an array list and writing that array list to a file.

P a g e | 12 4 .4. Explain how to handle errors: The software will display an error notice that reads, "Age cannot be left blank!" if the user inputs "age" outside of the permitted range (from 0 to 100) while inputting student information. Figure 11: Errors handled Code that does this: Figure 12: Errors handled code (Source Code) When entering student information, the software will display the notice "Grade unlawful 0 to 10" if

P a g e | 13 the user enters "Grade" outside of the permitted range (from 0 to 10). Figure 13: Errors handled Code that does this: Figure 14: Errors handled code (Source Code)