













































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














































Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 20: Advanced Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name NGUYEN TIEN LOC Student ID BHAF Class PBIT17102 Assessor name NGUYEN THAI CUONG 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 P3 P4 M3 M4 D3 D
Grade: Assessor Signature: Date: Lecturer Signature:
The previous report covered everything OOP-related, including OOP concepts, OOP traits, and much more. A basic introduction to UML and class relationships was also provided. In this report, I will select a specific scenario to apply a program to in order to put all of the previous report's knowledge into practice. The UML class diagram will be included in the report for clarity. Finally, a summary of the design pattern that will be used in future projects will be provided.
As mentioned in Assignment 1, I designed a book borrow management system. In this system, I have designed 5 main classes: Borrow, Person, Book, Journals and TextBook. The book borrow management system can provide a list of people who have borrowed books and the books currently available at the library. This makes managing the borrower easier and also helps the borrower find a specific book at any time in the library. The main functions that have also been developed by me include create, show, update and delete. To make this system, I will use the Java programming language and combine it with the Design Pattern to make it easier to reuse, maintain, and be flexible. The Builder Pattern will be the design pattern I have chosen.
In assignment 1, I designed a UML diagram for my project. But in this assignment, I have revised it to make it easier to understand and more convenient to write code program during project development process. The UML diagram as follows:
library. Maintaining a database used to add new books and track borrowers is another aspect of a book borrow management system. Some Requirements: Any library reader can conduct a book search using BookName, AuthorName, TypeName. Each book will have a special identification number, as well as other information, such as Journals or Textbook category, will assist in finding the book directly. Library members can borrow and reserve any copy of a book, even if it is available Multiple copies available. The system must be able to retrieve detailed information such as who borrowed a particular book or document. Each book and membership card will have a unique barcode. The system will be able to read the barcode on library cards and books I have planned to present the above scenario to show the features in OOP and optimize system the most. To apply for the project, I chose to use Builder Pattern to solve my problem. IV. Initialization Here I will initialize and show how to do work it and the function are implemented. Below is the Borrow class, I will declared Borrow ID and i had relationship to the Person and Book classes. Next I declared setter and getter functions for Borrow class.
In the Interface Folder, i will create ActionBorrow which is inherit all the function and methods, behavior of the Action class to be able to handle from the Manager.
Next, below is Edit function of Borrow Manage class on the Manage folder. Here, the user can enter ID what you want to edit. If the ID not existed ,the System will print “ not valid “ and else the System will display Book and Person for you.
Next, Below is the delete function of Borrow Manage on the manage folder. For this function, you can delete Borrow who want to delete. So, You only enter ID to delete and the remove it. Next , the show and search functions of this class. Below is detailed code and the way use to it. If the objects do not exist, I will display a message “ Not Found “.
Finally, in the Main class i have some pre-initialize objects as well as data added to the menu. below is the code for the casese user can select and conditions i have set for it.