1. Trang chủ
  2. » Luận Văn - Báo Cáo

assignment java prog191

25 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Assignment Java Prog191
Trường học BTEC Level 5 HND Diploma in Computing
Thể loại assignment
Năm xuất bản 2023
Định dạng
Số trang 25
Dung lượng 5,55 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

applying objectoriented design and analysis to a fictitious case. It describes the various aspects of OOP, such as abstraction, polymorphism, inheritance, and encapsulation. Using the OOP characteristics, I gave the diagram and code for each wallet. Heres an example to help you understand. In the second assignment, introduce a variety of UML class diagrams for objectoriented analysis and design, such as use case diagrams, class diagrams, sequence diagrams, activity diagrams, state diagrams, and flowcharts. I then provided examples of each type of chart I had stated and described. A quick introduction to various design patterns (three types: creativity, structure, and behavior) will be given to the audience, with diagrams utilized to describe the relevant patterns. UML classes are

Trang 1

ASSIGNMENT 1 FRONT SHEET

Unit number and title

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 signatureGrading grid

Grade (0-10)

Trang 2

❒ Summative Feedback: ❒ Resubmission Feedback:

IV Signature:

Trang 3

Table of Contents

TABLE OF CONTENTS 3

TABLE OF FIGURES: 4

1 INTRODUCTION: 5

2 REQUIREMENTS: 5

3 UI DESIGN: 6

4 IMPLEMENTATION: 7

4.2 3.1 M AIN F ORM : 7

C LASS B OOK : 8

CORE PROGRAM : 9

H OW I HANDLE ERRORS : 13

5 TESTING: 15

T EST PLAN 15

T EST L OG : 16

6 RUNNING PROGRAM: 20

7 CONCLUSION: 25

S TRONG POINT : 25

W EAK POINT : 25

Trang 4

Table of Figures:

Figure 1: Library management system User Interface 6

Figure 2: Main form looks 7

Figure 3: Program Structure 7

Figure 4: Class Book 8

Figure 5: GhiFile function 8

Figure 6: Table setup 9

Figure 7: Button SAVE 9

Figure 8: Button UPLOAD 10

Figure 9: ADD button 10

Figure 10: UPDATE button 11

Figure 11: DELETE button 12

Figure 12: SEARCH 12

Figure 13: UnSelected row 13

Figure 14: Duplicate ID 13

Figure 15: ADD error handle 14

Figure 16: Please reload table 14

Figure 17: Running program 20

Figure 18: Logo and Search bar 21

Figure 19: Table and Upload button 22

Figure 20: Get information form 23

Figure 21: Buttons 24

Trang 5

2 Requirements:

insurance, insurance, term, so I have designed boxes like: ID, Name, Age, allows users to enter all that information into table

function

incorrect input to re-fill

Trang 6

3 UI design:

Begin developing a software system that can suit common demands The initial step is to create a

wireframe to decide what the interface will look like, and then proceed from there Wireframing is a way

to design a website service at the structural level A wireframe is commonly used to layout content and functionality on a page which takes into account user needs and user journeys Wireframes are used early in the development process to establish the basic structure of a page before visual design and content is added

What definitely impresses users most in this program is the clarity of each piece of data Each part is separated not adjacent to each other, which will help users not to be confused between each part

Figure 1: Library management system User Interface

Trang 7

4 Implementation:

4.2 3.1 Main Form:

Tables will be displayed here for each Book data In the book table, manager may add, change, search , and delete goods

Figure 2: Main form looks

Figure 3: Program Structure

Trang 8

Class Book:

Figure 4: Class Book

Class book contains information of Book object including ID, Name, Author, Year Published

Figure 5: GhiFile function

This function is used by me to convert the data in the text Field and then convert it to bytes to save to the BookList.txt file

Trang 9

CORE program:

This is probably the most important part of the program Where the properties of the JFrame window are meticulously modified and specified in code to provide the best user interface

Figure 6: Table setup

In this table part, I declare 4 columns respectively ID, name, author, and year Published In addition, I useJFrame's built-in method, it is addMouseListener, so that the program can perform the action that I specify when clicking on each record in the table

Figure 7: Button SAVE

When it came to the save button, I used the "GhiFile" function above to save the data

Trang 10

Figure 8: Button UPLOAD

When you press the upload button, the program will delete all data in the table in front of you and put the data from the BookList.txt file up This is like refreshing the table and happens almost immediately

Figure 9: ADD button

This ADD button simply, when clicked, will get all the data entered in the text Field, save it in a ArrayList called Book and then print it out to the table

Trang 11

Figure 10: UPDATE button

The update button is similar to how the ADD button works, but the difference is that it will delete right atthe position we pointed at and then replace the deleted record

Trang 12

Figure 11: DELETE button

With delete button we just need to point the mouse then press the delete button the program will give aform to confirm that you want to delete that record then the program will delete all the data of thatrecord even in ArrayList Book and file BookList.txt

Figure 12: SEARCH

With the search section, we just need to enter the ID of the book in the search bar and the program will search in the table and then display it on the table automatically without having to press a button

Trang 13

How I handle errors:

- Error when the user has not selected the object to update or delete

Figure 13: UnSelected row

- Error when the user update or add same ID

Figure 14: Duplicate ID

Trang 14

- Error when the user do not fill completely information

Figure 15: ADD error handle

- Error when we get information from unadded column in ArrayList named Book

Figure 16: Please reload table

Trang 15

the table

User will fill out the blank form and hit ADD button

1106, Cây cam ngọt của tôi, José Mauro de Vasconcelos, 1968

The table will display a new student row after

hitting ADD button

table

User will hit the UPLOAD button

data from Book.txt file

then change the data of the selected row and press update button

1107, NHỮNG TÙ NHÂN CỦA ĐỊA LÝ, Tim Marshall,2021

Old data will be replaced bynew data after user press Update button

has selected a book

to update or not

Users will know that theyhave not selected

students to update

will be displayed by the program that will notice theuser to update

by id

Type book ID at the text field

matching book will be displayed atomically

window saying "saved"

type

Fill out 4 text field withwrong data type

wrong data type will be displayed when the user presses the ADD button

Trang 16

1106, Cây cam ngọt của tôi, JoséMauro de

Vasconcelos, 1968

display a new student row after

hitting ADD button

Trang 17

into table the UPLOAD

button

out by data from Book.txt file

select a row then change the data of the selected row and pressupdate button

1107, NHỮNG TÙNHÂN CỦA ĐỊA

LÝ, Tim Marshall,2021

replaced by newdata after user press Update button

Trang 18

message window will be displayed by theprogram that will notice the user to update.

input ID matching book will be displayedatomically

Trang 19

6 Save file Click the

button Save

will show a window saying

-1, hbhghja,skdaajs, 2021

to enter wrong data type will bedisplayed when the user pressesthe ADD button

Trang 20

6 Running program:

Figure 17: Running program

This is the main interface of the program Although the design is not too splendid, the information displayed is extremely detailedand clear The program is divided into three parts: The first part includes the search function and the body contains the list ofstudents and the input form The top part is the logo with the search bar right below it is a blank box used to enter information,command buttons, table

Trang 21

Figure 18: Logo and Search bar

For the upper part I arrange the objects in this section horizontally to save space and besides, it helps users to operate easily fromleft to right in order of function and selection The search bar will be located at the top like other applications and programs so thatusers feel familiar

Trang 22

Figure 19: Table and Upload button

Trang 23

Figure 20: Get information form

This is a form for entering book information when the user adds or updates book information The fields in the form are spacedapart to keep the form clear, so users don't have to feel uncomfortable filling out the form

Trang 24

Figure 21: Buttons

It is the soul of the program and helps the program work according to the user's requirements The keys are fairly evenly spaced so users don't have to worry about pressing the wrong one We have added icons to make the buttons more vivid so that the users don't get bored

Trang 25

7 Conclusion:

specifically I learned and worked with JFrame which is completely new than before

Strong point:

My program over time learning, I improve the program more complete with outstanding features such as:

Search, Update and Delete

Ngày đăng: 20/05/2023, 22:44

w