




































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!





































ASSIGNMENT 2 BRIEF
Scenario : (continued from Assignment 1) Your team has shown the efficient of UML diagrams in OOAD and introduction of some Design Patterns in usages. The next tasks are giving a demonstration of using OOAD and DP in a small problem, as well as advanced discussion of range of design patterns. Tasks: Your team is now separated and perform similar tasks in parallel. You will choose one of the real scenarios that your team introduced about DP in previous phase, then implement that scenario based
on the corresponding class diagram your team created. You may need to amend the diagram if it is needed for your implementation. In additional, you should discuss a range of DPs related / similar to your DP, evaluate them against your scenario and justify your choice. In the end, you need to write a report with the following content: A final version of the class diagram based on chosen scenario which has potential of using DP. Result of a small program implemented based on the class diagram, explain how you translate from design diagram to code. Discussion of a range of DPs related / similar to your DP, evaluate them against your scenario and justify your choice (why your DP is the most appropriate in that case). The working application must also be demonstrated. Learning Outcomes and Assessment Criteria Pass Merit Distinction LO 3 Implement code applying design patterns P3 Build an application derived from UML class diagrams. M3 Develop code that implements a design pattern for a given purpose. D3 Evaluate the use of design patterns for the given purpose specified in M3. LO4 Investigate scenarios with respect to design patterns P4 Discuss a range of design patterns with relevant examples of creational, structural and behavioral pattern types. M4 Reconcile the most appropriate design pattern from a range with a series of given scenarios. D4 Critically evaluate a range of design patterns against the range of given scenarios with justification of your choices.
Figure 4 Borrower Class Class called Borrower. This class inherits from the Persons class. It has 5 public properties: ID, Name, and Phone, Address and TypeOfPosition. TypeOfPosition: An integer that identifies the borrower's location type. Figure 5 Librarian Class The Librarian class has two public properties, this class inherits from the Persons class WorkHour: An integer specifying the librarian's working hours. LibrarianRole: A string that identifies the librarian's role.
Figure 6 BookManager Class “BookManager”
Figure 8 Client Menu Figure 9 Switch Case 1 - 4
Figure 10 Switch Case 5 - 9
Figure 15 Show all Person
Figure 16 Show Borrower
Figure 17 Search Person by ID
Figure 18 Add a New Book Figure 19 Add a new Book
Figure 20 Show All Book
1: Design patterns
Design patterns are basically defined as reusable solutions to the common problems that arise during software design and development. They are general templates or best practices that guide developers in creating well- structured, maintainable, and efficient code. (Geekforgeek, 2023) Figure 26 Design patterns in C#
Figure 27 type of Creational Design Pattern