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

Định dạng
Số trang 25
Dung lượng 5,55 MB

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

ASSIGNMENT FRONT SHEET Qualification BTEC Level HND Diploma in Computing Unit number and title Submission date 18/4/2023 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class GC 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: Grade: IV Signature: ❒ Resubmission Feedback: Assessor Signature: Date: Table of Contents TABLE OF CONTENTS .3 TABLE OF FIGURES: INTRODUCTION: REQUIREMENTS: UI DESIGN: IMPLEMENTATION: 4.2 3.1 MAIN FORM: CLASS BOOK: CORE PROGRAM: HOW I HANDLE ERRORS: 13 TESTING: 15 TEST PLAN 15 TEST LOG: 16 RUNNING PROGRAM: 20 CONCLUSION: .25 STRONG POINT: 25 WEAK POINT: 25 Table of Figures: Figure 1: Library management system User Interface Figure 2: Main form looks .7 Figure 3: Program Structure Figure 4: Class Book Figure 5: GhiFile function Figure 6: Table setup Figure 7: Button SAVE 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 Introduction: A client contacted me wanting book management software With the above requirement, I used Java Swing to create a software to support the management of books at the library With an intuitive graphical interface, this system allows administrators to easily perform document management functions such as adding, deleting, editing, searching for books, making it easy for administrators to check related information to books Using a book management system using Java Swing makes it possible for libraries to manage document information more efficiently and provide better services to their readers Requirements: - - As a library manager, I want to enter information such as: ID, name, age, address, gender, year of insurance, insurance, term, so I have designed boxes like: ID, Name, Age, allows users to enter all that information into table As a library manager, I want to to enter an unlimited number of book, so I created the add function As a library manager, I want to have a reasonable and user-friendly interface design As a library manager, I want to update all information of any books As a library manager, I want to delete all fields on the table that they have filled out because of incorrect input to re-fill As a library manager, I want to search for book information by ID As a library manager, I want to save data to a file 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 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 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 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 columns respectively ID, name, author, and year Published In addition, I use JFrame'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 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 10 Figure 10: UPDATE button The update button is similar to how the ADD button works, but the difference is that it will delete right at the position we pointed at and then replace the deleted record 11 Figure 11: DELETE button With delete button we just need to point the mouse then press the delete button the program will give a form to confirm that you want to delete that record then the program will delete all the data of that record 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 12 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 13 - Error when the user 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 14 Testing: Test plan Test What is being cas tested e Add student into the table How Test data used Check if the user has selected a book to update or not User will fill out the blank form and hit ADD button User will hit the UPLOAD button User will select a row then change the data of the selected row and press update button Users will know that they have not selected students to update Search for book by id Type book ID at the text field 1103 Save file Click the button Save NONE Enter wrong data type Fill out text field with wrong data type Upload data into table Update data 15 1106, Cây cam tôi, José Mauro de Vasconcelos, 1968 NONE 1107, NHỮNG TÙ NHÂN CỦA ĐỊA LÝ, Tim Marshall, 2021 NONE -1, hbhghja, skdaajs, 2021 Expected result The table will display a new student row after hitting ADD button The table will fill out by data from Book.txt file Old data will be replaced by new data after user press Update button An error message window will be displayed by the program that will notice the user to update When the user input ID matching book will be displayed atomically The program will show a window saying "saved" The notification to enter wrong data type will be displayed when the user presses the ADD button Test Log: Test What is How cas being e tested Add student User will fill into out the blank the table form and hit ADD button Upload data 16 User will hit Test data used Actual result Expected result 1106, Cây cam tôi, José Mauro de Vasconcelos, 1968 PASS The table will display a new student row after hitting ADD button NONE PASS The table will fill into table the UPLOAD button Update data User will select a row then change the data of the selected row and press update button 17 out by data from Book.txt file 1107, NHỮNG TÙ NHÂN CỦA ĐỊA LÝ, Tim Marshall, 2021 PASS Old data will be replaced by new data after user press Update button Check if the user has selected a book to update or not Users will know that they have not selected students to update NONE PASS An error message window will be displayed by the program that will notice the user to update Search for book by id Type book ID at the text field 1103 PASS When the user input ID matching book will be displayed atomically 18 Save file Enter wrong Fill out text data type field with wrong data type 19 Click the button Save NONE PASS -1, hbhghja, skdaajs, 2021 FAILED The program will show a window saying "saved" The notification to enter wrong data type will be displayed when the user presses the ADD button 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 detailed and clear The program is divided into three parts: The first part includes the search function and the body contains the list of students 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 20

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

w