Tải bản đầy đủ (.docx) (18 trang)

Java programming ha quang thong GCS200763

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (984.92 KB, 18 trang )

Higher Nationals in Computing

JAVA PROGRAMMING
ASSIGNMENT
No.1/1

Learner’s name: Hà Quang Thống
Assessor name: Nam Lam
Class: GCS0903B
Learner’s ID: GCS200763
Subject’s ID: Java Programming(PROG191)
Assignment due: March 11st ,2022Assignment submitted: March 10th ,2022


Table of Contents
Table of Figure


ASSIGNMENT 1 FRONT SHEET
Qualification

BTEC Level 5 HND Diploma in Computing

Unit number and title
Submission date

March 11st 2022

Re-submission Date

Date Received 1st submission



March 10th ,2022

Date Received 2nd submission

Student Name

Ha Quang Thống

Student ID

GCS200763

Class

GES0903B

Assessor name

Lam Nguyen Trung Nam

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)

THONG



❒ Summative Feedback:

Grade:
IV Signature:

❒ Resubmission Feedback:

Assessor Signature:

Date:


Assessment Brief
Student Name/ID Number

Ha Quang Thong / GCS200763

Unit Number and Title

Object Oriented Programming with Java

Academic Year

2020 - 2021

Unit Tutor

Nam Lam


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.

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.


I.

Introduction

I am currently a technician at a fairly large restaurant in Ho Chi Minh City. My main task is
to solve the problems that the restaurant is facing by creating a certain system. Now our
restaurant is having a pretty big problem. As follows:
Nowadays, setting the table before eating is a habit that everyone must have, because they do

not want to have trouble clearing the table. Therefore, the demand for online booking and
eating on the spot is increasing day by day. We are not able to record customer booking
information through normal recording. Their main problem is the issue of creating invoices.
Therefore, the owner of the restaurant asked me to create a program system that helps
employees somewhat. Besides, it also helps them quickly receive the information given by
customers more quickly.
II.

Requirement

Use case 1: Create/manager an order

Figure 1: Add new order


Use case 2: Modify an order

Figure 3: Save information

Figure 2: Modify an order
Use case 3: Save information of client
Use case 4: Client can book a table by website or calling (for client had account)
Use case 5: The way to book a table for client who do not have an account

Figure
Use-case
client
unregister
Figure
4:5:

Use-case
client
booking
table


III.

UI design

Wireframe 1: Page booking table

Figure 6: Home page
Wireframe 2: Choose the dish for party.

Figure 7: Choose the dish for party.


Wireframe 3: The table input client’s information for employee

Figure 8: The table input client’s information for
employee
Wireframe 4: Login form

Figure 9 Login form


Wireframe 5: Check the booking

Figure 10: Check the booking



IV.

Implementation

Implement CommissionEmployee

Explanation:
Figure 11: Code of Commission Employee
-

A form of EMPLOYEE is a COMMISSION EMPLOYEE.
‘Protected’ is often used to represent the traits that we (the designers) wish the
subclasses to inherit.
SetTotalSales(double s) assign the value of the totalSales property to
getTotalSales() can be used to obtain an attribute's value.
Employees who work only on commission are compensated based on the amount of
income they generate for the company. A compensation is a monetary payment made
to a worker when they finish a job or activity for a company. This is usually a
percentage or flat charge deducted from the money coming into the organization.[1]


Implement BasePlusCommission Employee
Explanation:

Figure 12: Code of Base Plus Commission Employee
-

super (): invoke its parent's constructor

baseSalary = baseSa: increase the employee's basic salary amount

Implements Serializable

Figure 13: Implements Serializable
Explanation:
-

This is a law (interface). Items must conform the Serializable system in order to be
written to a drive as entities.
Serialization is a notion that allows us to transfer the value of the a Java object into
such a style that can subsequently be saved and utilized with another operation. [2]


V.

Test

Create new booking

Figure 14: Create new order.
Create customer orders by entering available data and clicking the Create button. Pressing the
newly created button and storing it in the memory of the current computer

Create another order

Figure 15: Create another new order


View customers booked by pressing previous and next


Figure 16: The customer has booked a table

Figure 17: View clients booked by pressing ‘next’ button


By pressing create like the step above, it has stored the customer data and the staff can review
and confirm that information with the customer.
Save all information of booking

Figure 18 Save information of client booking and click (X)

Load all data of client when click turn off app

Figure 19: Click Load all client data to view client
who book a table


Figure 20: Result return for load client data

VI.

Conclusion

I overcame the problem the restaurant was having by creating a software that made it easier
for employees to work. At the same time, it also supports to review the customers who have
booked at the restaurant by loading data in the application.


Reference:

[1]: Indeed Editorial Team, February 24, 2021, indeed, Commission Employees: Definitions,
Regulations and Examples,
Available
at:
/>%20brought%20into%20the%20company. [Access at March 7th 2022]
[2]: Nguyễn Hữu Khanh, TOPDev, Nói về Serialization trong Java, Available at:
[Access at March 7th 2022]
[3]: Lam Nguyen Trung Nam, Lab6, LAB6 INHERITANCE, Available
/>[Access at March 7th 2022]

at:

[4]: Lam Nguyen Trung Nam, Lab8, LAB8 ASSIGNMENT GUIDE
IMPLEMENTATION,
Available
/>[Access at March 7th 2022]

TO
at:



×