




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
this is assignment 2 of Advanced Programming (1651).
Typology: Study Guides, Projects, Research
1 / 28
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 01/09/2022 Date Received 1st submission 01/09/ Re-submission Date Date Received 2nd submission Student Name Do Thanh Phong Student ID GCH Class GCH 0902 Assessor name Doan Trung Tung 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:
Figure 1: Class diagram.................................................................................................................................................. 5 Figure 2: Ward.cs........................................................................................................................................................... 9 Figure 3: MyObserver.cs ............................................................................................................................................. 10 Figure 4: Analyst.cs ...................................................................................................................................................... 10 Figure 5:Fanpage.cs ..................................................................................................................................................... 11 Figure 6: ProvincialChairman.cs .................................................................................................................................. 12 Figure 7: Subject.cs...................................................................................................................................................... 16 Figure 8: Menu.cs ........................................................................................................................................................ 17 Figure 9: MenuProgram.cs .......................................................................................................................................... 18 Figure 10: ManagerWard.cs ........................................................................................................................................ 19 Figure 11: ManagerObserver.cs .................................................................................................................................. 20
In the first report, my team and I gave the general concepts of OOP (object-oriented programming) and a description of the payroll management program using use case diagrams and class diagrams. In the next part, our team learned the concept of design patterns and selected a specific design pattern to find scenarios and build class diagrams. In that I selected the observer pattern it belongs to the behavior pattern group, then I selected the scenario of updating covid information in a city and gave a class diagram for that scenario. In this report, I will implement that scenario, and give pros and cons, compare it with other design parts, and why it fits the scenario.
In the context of the covid-19 pandemic, which is currently the most concerned topic, every change needs to be updated regularly and quickly for everyone. Since it is very important to update information quickly, the Ministry of Health will put each ward's epidemic information on the cloud so that the registrants will be automatically updated for any changes. For example, the government can quickly make announcements that are appropriate to the actual situation, fan pages can give information to viewers, or can calculate the rate for analysis. In order to update information and give instructions or warnings quickly, the provincial president needs to closely monitor the changing data of each direction in the province, fan pages need to provide data on the number of infections and deaths, now update of each ward, in addition, the ratios should also be given. For ordinary people, when registering to receive notifications from the Ministry of Health, they will receive information such as continuous updates of new cases, total current cases in the country update time, and advice. Also. the system can remove or add other observers at runtime.
b) Diagram.
ProvincialChairman - This class inherits the MyObserver class and overrides the Update() method.
Figure 7 : Subject.cs