BTEC HND Computing: Java GUI Application Development Assignment, Exercises of Java Programming

Assignment- Assignment java programming

Typology: Exercises

2021/2022

Uploaded on 05/20/2022

pmtk25
pmtk25 🇻🇳

4.8

(9)

7 documents

1 / 32

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 Student ID
Class Assessor name
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

Partial preview of the text

Download BTEC HND Computing: Java GUI Application Development Assignment and more Exercises 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 Student ID Class Assessor name 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:

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.

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.

1. INTRODUCTION

Nowadays, pets become one of the best friends of humans. From there, the pet products trade flourished. However, the manual sales management causes difficulties and delays. Therefore, I decided to create an application that supports pet store management in java language.

2. REQUIREMENT The java program that I created helped me with the following problems:

  • I can log in and out of the program -I can enter data and can edit and delete them easily and understandably -I can find the information about the product I need through the search function. 3. UI DESIGN Login interface : used to log into the program by entering username and password. There are two buttons: login and cancel, if wrong information is entered, a message will be displayed, if entered correctly, the system will be logged in.

Main interface: It is possible to add product information, edit and delete ... including labels, corresponding to it are text fields and combo boxes for users to enter corresponding information. Next to it are buttons for users to interact with the entered data. Finally, the table displays the entered results.

4. IMPLEMENTATION 4.1 Explain program structure

I have declared local variables with corresponding type (string, double, boolean...) as private to make them only used in this class, avoiding duplication of variables that I use in Jframe. Methods containing variables are declared, through which I push data inside the Jframe. The first is the initialization method. I use this method to initialize the objects I declared above which helps me to initialize values for the properties inside it and helps me to call other corresponding methods to initialize the logic inside the objects. subject. Then java's encapsulation through getter and setter methods defines accessibility for private properties and allows those properties to be viewed and modified.

4.3 Explain important algorithms I built my program as follows: First, I imported the libraries that I will use in my program: In the product class, I have declared properties like file (for file read and write functionality), a new List named item linked from the Item.java class I created, a memory variable which is the model used to display function information

Sort function: use conditional sentences to compare values and sort in ascending order of product name or price

Delete function: use conditional sentences to perform delete function. if a product is selected for deletion, a message confirming whether to delete it will be displayed; If no product has been selected, it will ask to select a product to delete

Update function: try -catch is used to catch an exception if the input price data is not numeric. Conditional sentences are used to check whether the information entered is sufficient or not; If yes, update, if not, complete information is required 4.4 Explain how to handle errors This is the interface when the user enters the wrong username or password when logging in

This is the interface when successfully logged into the program This is the interface when the user wants to search without entering the product ID

This is the interface that requires entering full information when adding a product This is the interface that requires entering the product value if the price is empty

This is the interface that requires entering the product value if the price is empty This is the interface that requires entering full information when updating a product