ASSIGNMENT 1 FRONT SHEETQualificationBTEC Level 5 HND Diploma in ComputingUnit number and titleUnit 20: Advanced ProgrammingSubmission date06/10/2020Date Received 1st submissionRe-submission DateDate Received 2nd submissionStudent NameLe Huy HoangStudent IDClassGch0717Assessor nameLe Minh DucStudent declarationI certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand thatmaking a false declaration is a form of malpractice.Student’s signaturehoangGrading gridP1P2M1M2D1D2
Summative Feedback:Resubmission Feedback:Grade:Assessor Signature:Date:Lecturer Signature:
Table of ContentsI.Introduction...............................................................................................................................................................................................4II.Object-Oriented Programming (OOP).........................................................................................................................................................41.Definition...............................................................................................................................................................................................42.Characteristics of OOP............................................................................................................................................................................43.Scenario OOP.........................................................................................................................................................................................4III.Design Pattern......................................................................................................................................................................................101.Behavioral Pattern................................................................................................................................................................................102.Creational Pattern.................................................................................................................................................................................143.Structural Design Pattern......................................................................................................................................................................16References...........................................................................................................................................................................................................20Figure 1: Usecase Diagram for OOP Scenario.........................................................................................................................................................6Figure 2:UML class Diagram for OOP Scenario.......................................................................................................................................................8Figure 3: Activity Diagram for OOP Scenario..........................................................................................................................................................9Figure 4: Behavior pattern Structure (Mössenböck, 1993)....................................................................................................................................11Figure 5: Diagram of the Scenario.........................................................................................................................................................................13Figure 6: Builder Design pattern Diagram.............................................................................................................................................................16Figure 7: Adapter design patternStructure (Mössenböck, 1993)..........................................................................................................................18Figure 8: Class diagram for the scenario................................................................................................................................................................19
I.IntroductionObject-oriented programming (OOP) is one of most programming method nowadays. It helps to increase productivity, simplifymaintenance when maintaining, easier to learn, easier to learn than previous methods, reduce the amount of code. This document will introduceabout basic concepts of OOP and design pattern. (Mössenböck, 1993)II.Object-Oriented Programming (OOP)1.Definition"Object-oriented programming means programming with abstract data types (classes) using inheritance and dynamic binding".2.Characteristics of OOPEncapsulation: As a way to hide the inner handling properties of an object, other objects cannot be directly manipulated to changethe state that can only be accessed through the public methods of that object.Abstraction: An abstraction method defines the actions and properties of certain types of objects.Polymorphism: An object of different classes that can understand the same message in different ways.Inheritance: A technique that allows inheriting features that another object already has, helping to avoid redundant codeduplication but only when processing the same job.3.Scenario OOPThe library has many bookshelves that store different types of books. Borrowers and librarians may search for books by title, category orpublisher name of the book. When a book is found, the system will automatically notify whether the book is still available on the shelf or not.Those who want to borrow books can log in and use their account to keep the number of books they want to borrow and come to the library toreceive within 3 days. Or the borrower has a direct registration with the librarian at the library. The system will automatically notify the borrowertoreturn the book if it is overdue through the account. After the book is returned to the library, the librarian will immediately check the status of
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 20 pages?
Upload your study docs or become a
Course Hero member to access this document