Questions
3 questions in typical semester theory exams
Difficulty
Medium
Importance
Core curriculum for BCA/MCA and Computer Science engineering
Overview
Design and Patterns form the architectural foundation of software engineering, focusing on creating modular, maintainable, and scalable systems. Mastering these concepts is essential for university exams as they bridge the gap between theoretical coding and professional software architecture.
Design Principles
Design principles represent the fundamental guidelines that developers follow to ensure code quality and reduce technical debt. Understanding concepts like SOLID is critical for high-scoring answers in descriptive university exams.
- Single Responsibility Principle (SRP): One class, one reason to change.
- Open/Closed Principle: Software entities should be open for extension but closed for modification.
- Liskov Substitution Principle (LSP): Subtypes must be substitutable for base types.
- Interface Segregation Principle (ISP): Clients should not depend on interfaces they do not use.
- Dependency Inversion Principle (DIP): Depend on abstractions, not concretions.
- DRY (Don't Repeat Yourself) and KISS (Keep It Simple, Stupid) principles.
Common Design Patterns
Design patterns are repeatable, standardized solutions to common problems encountered during software design. Exam questions typically focus on categorizing these into Creational, Structural, and Behavioral types.
- Creational: Singleton, Factory Method, Abstract Factory, Builder.
- Structural: Adapter, Decorator, Facade, Composite, Proxy.
- Behavioral: Observer, Strategy, Command, Iterator, State.
- Singleton pattern ensures a class has only one instance and provides a global point of access.
- Factory Method creates objects without specifying the exact class of object to be created.
UML Diagrams
Unified Modeling Language (UML) is the industry-standard visual notation used to document software design. For exams, you must be able to draw and interpret structural and behavioral diagrams accurately.
- Class Diagrams: Illustrate the static structure of the system using classes and relationships.
- Sequence Diagrams: Detail how objects interact over time in a specific scenario.
- Use Case Diagrams: Define system boundaries and functional requirements.
- Activity Diagrams: Model the workflow or procedural logic of the system.
- State Machine Diagrams: Represent the various states an object transitions through.
Formula Sheet
High Cohesion and Low Coupling (Design Metric)
Cyclomatic Complexity = E - N + 2P
Coupling (Data, Stamp, Control, Common, Content)
Exam Tip
When writing about a specific design pattern, always include a brief 'When to use it' section and a small sketch of the class structure to maximize marks.
Common Mistakes
- Confusing Creational patterns with Behavioral patterns during classification questions.
- Ignoring the specific relationships (Association vs. Aggregation vs. Composition) in Class Diagram notations.
- Over-engineering a simple software problem by applying too many design patterns unnecessarily.
More Revision Notes
Ready to test yourself?
Play topic-wise Design & Patterns questions in Aspirant Arcade — gamified MCQ practice.
Download Free