WEBG301 Javaprograming, Assignments of Java Programming

Assignment Assignment Assignment Assignment

Typology: Assignments

2021/2022

Uploaded on 07/18/2022

january03
january03 🇻🇳

4 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Higher Nationals in Computing
Java Programing
ASSIGNMENT
Learner’s name: LE HO DUC LAM
ID: GCS200675
Class: GCS0905C
Subject code: 1631
Assessor name: VU THANH HIEN
Assignment due: Assignment submitted:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download WEBG301 Javaprograming and more Assignments Java Programming in PDF only on Docsity!

Higher Nationals in Computing

Java Programing

ASSIGNMENT

Learner’s name: LE HO DUC LAM

ID: GCS

Class: GCS0905C

Subject code: 1631

Assessor name: VU THANH HIEN

Assignment due: Assignment submitted:

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 LE HO DUC LAM Student ID GCS

Class GCS0905C Assessor name VU THANH HIEN

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)

Assessment Brief Student Name/ID Number Unit Number and Title Object Oriented Programming with Java Academic Year 2020 - 2021 Unit Tutor Assignment Number & Title Design, Implement and Test a GUI application Issue Date Submission Date IV Name & Date Submission Format The submission is in the form of a written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system.

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 Content

    1. Introduction:
    1. Requirement:
    1. UI design:
    1. Implementation:
    1. Test:
    1. Result:

P a g e | 1 ASSIGNMENT 2 ANSWERS

1. Introduction:

  • Product and sales management has never been a simple matter for companies as well

as small shops. So in this assignment, I made a software to make product management

as well as sales simpler.

  • Product management in the store is to manage the number of products available, the

price of each product, etc

  • In product management, there are many products with different prices. The “Product

Management” program covers many areas such as product code, product name,

product quantity, and cost of each product type.

2. Requirement:

  • Create Invoice
  • Add, remove product updates
  • Export product list

Export invoice list

  • Import product list
  • Import invoice list

3. UI design:

  • Sale UI:
  • Storage UI:

P a g e | 3

4. Implementation:

  • Program structure:
    • Package declaration: In Java, classes can be stored in several directories or

packages according to the module they are used in. An absolute path from the

source directory is regarded as a package declaration for all the classes that are

contained in a single parent source directory.

  • Import statements: There are many classes produced by people, corporations,

etc. that might be beneficial in our application, and there may be classes

written in other folders or packages of our active Java project. We must import

the class we want to utilize in order to use them in it. Multiple import

statements can be made since numerous classes can be imported into a single

application.

  • Comments: In Java, the comments can be used to explain a variable, function,

class, or any other statement. The program code may also be temporarily

hidden using this technique.

  • Class Definition: A class in a java file has to be given a name. This name is used

in other classes or programs when generating a class object.

  • Variables: A Java application's main method is where execution begins. It is, in

other words, a point of entry for a class or application that launches during

Java Run-time.

  • Methods/Behaviors: a group of instructions that together make up a

functional component that may need to be executed more than once when a

program is being performed. The instructions are included in a method so that

they are not repeated when the same functionality is needed. By providing

variables to a method, one may manipulate the behavior of the method.

P a g e | 4

  • Classes:
    • Store_view:

✓ CircleKView class is responsible for direct interaction with the user

  • SaleController:

✓ SaleController class is responsible for receiving requests from users and

using SaleModel and CircleView to process and return results to users.

  • SaleModel:

✓ SaleModel class is created to hold object information (Data), interact

with Database. Responsible for object modeling.

  • Important algorithms:
    • The most important algorithm used in software is the algorithm used for

querying as well as modifying data on the database.

  • How to handle errors:
    • Since the software is written entirely in java language, I used the try-catch block

to catch exceptions when the program was executed.

5. Test:

Number Test case Input data

Expected output Actual output Evaluation Test Day

Test insert Button Id: 01 Name: Sting Quantity: 01 Price: 10000 When you click the insert button, the software will get data from the corresponding jtextfields and put the data on the database When the insert button is clicked, the data is correctly added to the database Succes 5/7/

Test delete Button Click on delete button When the user selects the row to delete on the jtable and presses the delete button, the program will run the delete command on the database and the selected data line will be deleted correctly. The program correctly deletes the selected data line Succes 5/7/

Test update button Id: 01 Name: Redbull Quantity: 10 When you press the update button, the system will get the data from The program correctly updates the selected data field Succes 5/7/

P a g e | 6

the user just needs to hit the refresh button to be able to refresh the payment screen.

  • After completing the transaction, the user clicks on the pay button to end the invoice

and save it in the database

✓ Storage monitor:

P a g e | 7

✓ Export:

✓ Import:

REFERENCES

1. Peter van der Linden, Just Java™ 2, Fifth Edition

2. Paul J Deitel & Harvey M Deitel, Java for programmers (Prentice Hall) (2012).