LAB # 11 Behavioral Patterns: Null Object Pattern Objective

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SWE-208: Software Design and Architecture SSUET/QR/114

LAB # 11
Behavioral Patterns: Null Object Pattern
OBJECTIVE
Implementation of Behavioral Design Pattern: Null Object Pattern.

Exercise:
You all must be aware of the National Immunization Management system. If you are done with
your COVID vaccination, you can simply download your vaccination certificate from the
website by providing your CNIC no., and CNIC issue date. Can you apply Null Object Pattern
here for the citizens who are not done with their vaccination?

Hint: We are going to create an AbstractCitizen abstract class defining operations. Here
VaccinatedCitizen and NonVaccinatedCitizen concrete classes are extending
the AbstractCitizen class. A factory class CitizenFactory is created to return
either VaccinatedCitizen or NonVaccinatedCitizen objects based on the details of citizen
passed to it.

Make a class diagram first and then implement it.

Name: Esha Muhammad Fayyaz


Roll No: 2020F-BSE-121 -- Section: C
1
SWE-208: Software Design and Architecture SSUET/QR/114

Name: Esha Muhammad Fayyaz


Roll No: 2020F-BSE-121 -- Section: C
2
SWE-208: Software Design and Architecture SSUET/QR/114

Name: Esha Muhammad Fayyaz


Roll No: 2020F-BSE-121 -- Section: C
3
SWE-208: Software Design and Architecture SSUET/QR/114

OUTPUT:

Name: Esha Muhammad Fayyaz


Roll No: 2020F-BSE-121 -- Section: C
4

You might also like