- Course Code : BCGL504
- Credits : 1
- To introduce students to the fundamental principles and concepts of design patterns and their role in object-oriented software development.
- To equip students with the skills to identify and apply the most appropriate design patterns to solve common software design problems.
- To develop the ability to analyze the advantages and disadvantages of different design patterns in real-world applications.
- To provide hands-on experience in implementing various design patterns using object-oriented programming languages.
-
Design and implement ShapeFactory class that generates different types of Shape objects (Circle, Square, Rectangle) based on input parameters using Factory Design Pattern.
-
Design and Implement an AbstractFactory class to create families of related or dependent objects with respect to decathlon store without specifying their concrete classes using Abstract Factory.
-
Design and implement a complex object like a House using a step-by-step Builder pattern, allowing different representations of the house (wooden, brick, etc.).
-
Design and Implement to Extend a Coffee object with dynamic features (e.g., milk, sugar, whipped cream) using Decorators.
-
Design and Implement a Logger class ensuring a single instance throughout the application
-
Design and implement an Adapter Pattern for a Music System.
-
Design and Implement an Observer pattern for a news agency to notify subscribers of updates.
-
Design and Implement a Façade pattern for home theatre system.
-
Design and Implement a Template Method for Document Processing (word, pdf, excel)
-
Design and Implement weather monitoring system that notifies multiple display devices whenever the weather conditions change that follows the Observer Design Pattern.
-
Design and Implement a Proxy pattern to control access to an object (e.g., a protected resource or remote service).
-
Design and Implement a Mediator pattern to manage communication between a set of objects (e.g., chat room with multiple participants).
-
Association - General relationship between two classes without specifying the nature of relationship.
-
Directed Association - Similar to association, but it also gives information about the direction of relationship.
-
Aggregation - The relationship where a child can exist independently from the parent. Deleting the parent class will not affect the child's class.
-
Dependency - Indicates that one class is dependent on another class.
-
Generalization - Generalization is nothing but inheritance. where a class inherits another class.
-
Interface Realization - One model depends on another model. For example, interface and class.
Access specifiers can be specified at the begining when creating a method or attribute. Ex : "+ getDescription()"
- "+" = Public
- "-" = Private
- "#" = Protected
-
Return type of any method can be specified after the method name seperated by a colon. Ex : "getData(): int".
-
Parameters are passed to the methods where the parameter name is followed by its data type seperated by a colon. Ex: "name: String".
-
isAbstract must be ticked to mark a class Abstract and is denoted by Italic Class name in diagram.
-
isLeaf must be ticked to mark a method or attribute Final.
-
isStatic must be ticked to mark a method or attribute Static and is denoted by underline in diagram.