
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Assignment- Assignment java programming
Typology: Exercises
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























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)
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:
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