0% found this document useful (0 votes)
10 views18 pages

Oomd 1

The document discusses composite states in state diagrams, explaining their hierarchical structure and categorization into orthogonal and simple composite states. It also covers use case terminology, including actors, system boundaries, and relationships like include and extend, alongside the creation of use case diagrams for ATM and online reservation systems. Additionally, it describes sequence diagrams, activity diagrams, and the relationship between class and state models in object-oriented design.

Uploaded by

Sunny Ghatage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views18 pages

Oomd 1

The document discusses composite states in state diagrams, explaining their hierarchical structure and categorization into orthogonal and simple composite states. It also covers use case terminology, including actors, system boundaries, and relationships like include and extend, alongside the creation of use case diagrams for ATM and online reservation systems. Additionally, it describes sequence diagrams, activity diagrams, and the relationship between class and state models in object-oriented design.

Uploaded by

Sunny Ghatage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

UNIT 3 sufficient funds are available, the transaction is approved,

1.]What are Composite states? Explain Categories of and the ATM dispenses the requested cash. Check
Composite states. [6]>>>composite states are states that Balance: Scenario: The customer inserts the ATM card,
contain nested or sub-states within them allowing a enters the PIN, and selects "Check Balance." The ATM
hierarchical breakdown of complex behavior these states displays the current account balance. Description: The
help simplify the state diagram by grouping related states Bank System retrieves the account balance and sends it to
together and showing multiple states within a single state the ATM for display. Diagram: The use case diagram
composite states are used to represent scenarios where typically involves representing the system boundary (ATM
an object can experience different modes of operation or system), actors (Customer and Bank System), and the use
conditions while maintaining a broader state composite cases (Withdraw Cash, Check Balance). The diagram
states are categorized into two types first orthogonal shows how actors interact with the system and how use
states these states have concurrent regions or sub-states cases are related to each other and the actors. Key
that operate independently allowing an object to be in Points: The system boundary represents the ATM system
multiple states at the same time this is useful for systems itself. Actors are represented by stick figures. Use cases
that require parallel operations second simple composite are represented by ellipses. The association between
states these states contain sequential sub-states meaning actors and use cases is represented by lines. The
the system transitions through the sub-states in a defined "include" relationship is used to show common
order composite states improve readability and functionality (e.g., "Authenticate User" could be included
maintainability by organizing the state diagram into in both "Withdraw Cash" and "Check Balance"). The
logical structures "extend" relationship is used to show optional behavior
2.]Explain Following terms with respect to use case:i) (e.g., "Cancel Transaction" could extend any use case).
Use Case ii) Actor iii) System Boundary iv) Include>>>i 4] What is an Actor, a Use Case, Use case diagram?
use case a use case is a description of a set of actions that Explain various relationships in use case diagram with
a system performs to achieve a specific goal or task it example. [5] >>>An actor is any external entity, typically
represents a functional requirement of the system and a user or another system, that interacts with the system
details the interaction between an actor and the system being modeled. The actor initiates or participates in a use
each use case captures a piece of functionality such as case to accomplish a goal. An actor can be a person,
logging in or withdrawing money from an atm ii actor an another system, or an external device. A use case is a
actor is any external entity such as a user or another description of a set of actions or tasks that a system
system that interacts with the system being modeled performs to achieve a specific goal or fulfill a
actors initiate use cases to achieve their goals for requirement. It captures the interaction between the
example in an atm system the actor could be a bank actor and the system. A use case diagram visually
customer or the bank system iii system boundary the represents the actors, use cases, and their interactions
system boundary defines the scope of the system it within a system, helping to identify the system's
visually separates the system's internal processes from functionality. Relationships in Use Case
external actors and shows what is included in the system Diagram:1.Association: This relationship links an actor to
and what is outside it helps in identifying the limits of the a use case, showing that the actor interacts with the
system's functionality iv include the include relationship system to perform the use case. For example, in an ATM
in a use case model allows one use case to incorporate system, the Customer actor is associated with the
the behavior of another use case this promotes Withdraw Cash use case. 2.Include: The include
reusability and modular design when a specific relationship shows that one use case includes the
functionality is common to multiple use cases the include functionality of another use case. This allows reuse of
relationship can be used to avoid redundancy for example common behavior across multiple use cases. For example,
a use case for withdrawing money might include a use Authenticate User could be included in both the
case for verifying the pin Withdraw Cash and Check Balance use cases. 3.Extend:
3] Draw and explain. Explain at least two use cases with The extend relationship indicates optional or conditional
the help of use case scenario. [8] >>>Use Case Diagram behavior that extends a base use case under certain
for ATM System {diagram conditions. For example, a Cancel Transaction use case
>>>>Explanation: Actors: Customer: The end-user who could extend the Withdraw Cash use case if the customer
interacts with the ATM to perform transactions. Bank decides to cancel the transaction during the process.
System: The backend system that processes requests and
manages accounts. Use Cases: Withdraw Cash: Scenario:
The customer inserts the ATM card, enters the PIN,
selects "Withdraw Cash," chooses an amount, and the
ATM dispenses the cash. Description: The Bank System
verifies the PIN and checks the account balance. If
c) Draw Sequence diagram for ATM Machine (Complete Diagram: An interaction diagram is a type of UML (Unified
view). Modeling Language) diagram that shows the dynamic
A Sequence Diagram for an ATM system shows the behavior of a system by illustrating how objects
interactions between the ATM, the customer, and the communicate and interact with one another. It focuses on
bank system in a time-ordered manner. It typically message exchanges and the sequence of events to
includes objects like the ATM, customer, and bank represent a system's flow of control. Components of a
system, with interactions (messages) shown as arrows Sequence Diagram: 1. Lifeline: - Represents an object or
between them, ordered by time from top to bottom. participant involved in the interaction. - Depicted as a
Sequence Diagram for ATM Machine (Complete View): vertical line with the object or class name at the top. -
1. Customer inserts the ATM card into the ATM. 2. ATM Signifies the existence of an instance during the
prompts the customer to enter the PIN. 3. Customer interaction. 2. Message: - Represents communication
enters the PIN and submits it. 4. ATM sends a request to between objects in a sequence. - Can be synchronous
the Bank System to validate the PIN. 5. Bank System (solid arrow) or asynchronous (dashed arrow). - Conveys
checks the PIN and sends back a validation response information, requests operations, or triggers responses.
(success or failure). 6. If the PIN is correct, ATM prompts 3. Activation: - Represents the time period when an
the customer to choose a transaction (Withdraw Cash, object is actively executing a method. - Depicted as a
Check Balance, etc.). 7. Customer selects the transaction narrow rectangle on the lifeline. - Indicates processing of
(e.g., Withdraw Cash). 8. ATM asks for the amount to a message or waiting state. 4. Interaction Occurrence: -
withdraw. 9. Customer enters the amount to withdraw. Represents a nested interaction or reference to another
10. ATM sends the withdrawal request to the Bank interaction. - Depicted as a rectangular box with a
System along with the amount. 11. Bank System checks reference label. - Useful for reusing interaction definitions
the account balance, approves the withdrawal, and sends in multiple scenarios. 5. Combined Fragment: - Groups or
the approval to the ATM. 12. ATM dispenses the constrains the sequence of messages based on
requested amount of cash. 13. ATM prints a receipt if conditions. - Defines alternative paths, loops, or parallel
requested. 14. Customer collects the cash and receipt, executions. - Common types include alt (alternative),
and the session ends with the ATM ejecting the card. This loop, and par (parallel). 6. Return Message: - Represents
sequence diagram outlines the step-by-step flow of the response sent from the called object back to the
interaction between the customer, ATM, and bank caller. - Depicted as a dashed arrow labeled "return."
system during a typical ATM transaction. These components together depict the interactions,
5] What do you mean by activity? Consider ATM message flows, and conditions in a system, providing a
scenario, Identify and explain at least five activities clear view of object communication and control flow.
involved in ATM system scenario. 7] Compare Sequence diagram and Activity diagram. [6]
An activity represents a task or process in a system, Aspect Sequence Diagram Activity Diagram
typically shown as a rounded rectangle in activity Shows object
diagrams. Activities often reflect the flow of work or Shows the flow of
Purpose interactions over
operations within a system. In the context of an ATM activities or processes.
time.
system, several activities occur when a user interacts with
Uses objects, Uses activities,
the machine, such as inserting a card, entering a PIN,
Components lifelines, and decisions, and
selecting a transaction, and receiving the requested
messages. transitions.
services. Activities in ATM System Scenario: 1. Insert
Card: The customer inserts the ATM card into the Emphasizes the
Highlights workflows,
machine, which is the starting point of the interaction. 2. Focus order of messages
decisions, and actions.
Enter PIN: The customer enters their Personal between objects.
Identification Number (PIN) to authenticate their identity. Best for showing Ideal for illustrating
3. Select Transaction: After successful authentication, the Use Case how objects interact workflows and process
customer selects the type of transaction (e.g., Withdraw in a scenario. flows.
Cash, Check Balance). 4. Enter Amount: If the transaction Represents structured
involves a monetary action, the customer enters the Displays linear,
processes, including
amount to be withdrawn or deposited. 5. Dispense Visualization time-based
loops and parallel
Cash/Provide Receipt: After processing the transaction, interactions.
paths.
the ATM dispenses the requested cash or provides a Focuses on
receipt to the customer. These activities reflect the Focuses on the overall
Relation interaction between
sequence of tasks involved in a typical ATM operation, process flow.
objects.
ensuring the process is efficient and secure.
6] What is an Interaction Diagram? Explain Different
8] Design use case diagram for online reservation
Components of a Sequence Diagram. Interaction
system. [6]
within a system by displaying the flow of messages
exchanged between them. For example, in an ATM
system, the sequence model for withdrawing cash could
involve the Customer interacting with the ATM by
inserting the card, entering the PIN, selecting the
withdrawal option, and the ATM communicating with the
Bank System to validate the PIN, check the balance, and
dispense cash. The sequence model would show the
order of these interactions, from the customer's request
to the final action of dispensing the cash, thus clarifying
how the system components work together step-by-step.
10] Explain the relation of class model and state model.
[5]
The Class Model and the State Model are both essential
in object-oriented design, but they serve different
purposes and complement each other. The Class Model
represents the static structure of a system, showing the
Explanation: 1. Actors: - User: Represents the individuals classes, their attributes, methods, and relationships. It
who use the online reservation system to make defines what objects the system will have, their
reservations. - Admin: Represents the administrators or properties, and how they relate to each other. The State
staff members who manage and maintain the reservation Model, on the other hand, represents the dynamic
system. 2. Use Cases: - Make Reservation: Allows the behavior of objects, focusing on the states an object can
User to search for available services or facilities, select a be in and how it transitions between those states based
specific time slot, and make a reservation. - View on events. While the Class Model shows the structure,
Reservation: Enables the User to view their existing the State Model shows the lifecycle of an object. These
reservations, including details and status. - Manage models are related in that the State Model often refers to
Reservations: Allows the Admin to manage reservations, specific objects or classes defined in the Class Model. For
including tasks like adding new reservations, updating instance, in a bank account system, the Class Model
reservation details, and canceling reservations. - Add would define the BankAccount class with attributes like
New Reservation: Exclusive to the Admin, it enables them balance, while the State Model would define states such
to add a new reservation to the system. 3. Relationships: as Active, Suspended, and Closed for the BankAccount
- User interacts with the Make Reservation and View class, illustrating how the account changes states based
Reservation use cases, representing their actions and on events like deposits, withdrawals, or account closure.
access to reservation-related functionality. - Admin 11] State the relationship between class and state
interacts with the Manage Reservations and Add New model. [5]
Reservation use cases, representing their ability to The Class Model and the State Model are both essential
manage reservations and add new ones. - Register/Log in object-oriented design, but they serve different
In: This use case, not explicitly shown in the diagram, purposes and complement each other. The Class Model
would handle the registration and login functionality for represents the static structure of a system, showing the
both Users and Admins. This diagram provides an classes, their attributes, methods, and relationships. It
overview of the interactions between the system's actors defines what objects the system will have, their
and use cases. It illustrates the core functionalities of the properties, and how they relate to each other. The State
online reservation system and the roles of different users. Model, on the other hand, represents the dynamic
Please note that this is a simplified representation, and in behavior of objects, focusing on the states an object can
a real-world scenario, you may have additional use cases, be in and how it transitions between those states based
actors, and relationships based on the specific on events. While the Class Model shows the structure,
requirements of your system. the State Model shows the lifecycle of an object. These
9] What is Sequence model? Explain with suitable models are related in that the State Model often refers to
example. [5] specific objects or classes defined in the Class Model. For
A Sequence Model represents the order of interactions instance, in a bank account system, the Class Model
between objects in a system over time. It is primarily would define the BankAccount class with attributes like
depicted in a Sequence Diagram in UML, where the balance, while the State Model would define states such
interactions between objects are shown sequentially, as Active, Suspended, and Closed for the BankAccount
from top to bottom, with the time progression from left class, illustrating how the account changes states based
to right. The sequence model helps to understand how on events like deposits, withdrawals, or account closure.
objects collaborate to fulfill a specific function or process
12] What do you mean by activity? How are activities, considered as a configuration to balance the forces.
branches, and concurrent activities represented? ##There are two apsects of a solution - Static Aspect:
Prepare an activity diagram that elaborates the details Every pattern specifies certain structure and
of logging into an email system. configuration of elements. This addresses the static
An activity refers to a task or process in a system that is aspect of the solution. Dynamic Aspect: Every pattern
performed to achieve a specific goal. In an Activity specifies the runtime behavior.
Diagram, activities are shown as rounded rectangles, and 14] What are important parts of Design pattern:-
they represent the operations or functions that need to 1).Architectural patterns: This pattern describes software
be carried out within the system. In the context of an architecture that are built as per the structuring
ATM System, several activities occur during the user's principles. It expresses a fundamental structural
interaction with the ATM, which can include inserting a organizational schema for software systems. • It provides
card, entering a PIN, and selecting a transaction type. the set of predefined subsystems, specifies their
Activities in ATM System Scenario: 1.Insert Card: The responsibilities. It includes rules and guidelines for
customer inserts the ATM card into the machine. This organizing the relationships between them. 2) Design
activity marks the beginning of the interaction, enabling pattern:provides scheme for redefining the subsystem or
the ATM to identify the user. 2.Enter PIN: After inserting components of software system relationships between
the card, the customer is prompted to enter their them. • It describes a common structures of
Personal Identification Number (PIN). This activity is communicating components that solves general design
crucial for verifying the customer's identity and ensuring problems within particular context. • Design patterns are
security. 3.Select Transaction: Once authenticated, the medium scale patterns. 3) Idioms: An idioms represent
customer selects the type of transaction they wish to the lowest patterns. • An idiom is a low-level pattern
perform, such as Withdraw Cash or Check Balance. This specific to a programming language. • The idioms
activity involves choosing the operation to be performed describe how to implement components or relationships
and may trigger further sub-activities, such as entering among the components using the features of specific
the amount to withdraw or checking the balance. These programming.
activities ensure that the user can interact with the ATM
securely and efficiently, while the system processes their UNIT 4
requests. Q.1] EXPLAIN THE PROCESS OF BUILDING CLASS MODEL
13] Patterns Patterns help you build on the collective DURING REVERSE ENGINEERING.>>> The process of
experience of skilled software engineers. According to the building a class model during reverse engineering involves
architect Christopher Alexander defines the term pattern the following steps: 1. System Understanding: - Gain a
as "Each pattern is a three-part rule, which expresses a comprehensive understanding of the software system
relation between a certain context, a problem, and a being reverse engineered. - Identify the purpose,
solution.**"A pattern or design pattern provides a functionality, and scope of the system. 2. Source Code
general reusable solution for the common problems that Analysis: - Analyze the source code or compiled artifacts
occur in software design.##Pattern Describe three Parts:- of the system. - Identify classes, their attributes,
**1).Context It is basically a situation due to which the methods, and relationships. - Examine naming
problem is raised. The context can be general or it can be conventions, code structures, and patterns to identify
specific. Specifying the correct context for a pattern is classes. 3. Class Identification: - Document the identified
difficult because it is practically impossible to determine classes, their attributes, and methods. - Determine the
all the situations. A general approach for defining the visibility, data types, and behavior of the attributes and
context for a pattern is to make a list of all known methods. - Classify classes based on their responsibilities
situations. These are the situations for which particular and relationships. 4. Relationship Identification: - Identify
pattern can occur. 2).Problem:-This is a part of pattern the relationships between classes, such as associations,
description schema that occur repeatedly in a specific dependencies, and inheritance. - Analyze code
context. The term force is used to denote the aspect of interactions and dependencies to determine the nature
the problem that should be considered while solving it. of relationships. - Document the relationships in the class
For instance - The solution must satisfy all the model. 5. Documentation and Visualization: - Create a
requirements of the problem. The solution must consider visual representation of the class model using modeling
all the constraints All the desirable properties must be tools or diagrams. - Document the identified classes, their
present in the solution. For example - Model View attributes, methods, and relationships. - Ensure the
Controller used in user interface applications must be diagram is clear, organized, and easy to understand. 6.
easy to modify and its functionality must not be affected Refinement and Validation: - Review and validate the
due to the modifications made in For a problem, the set generated class model for accuracy and completeness. -
of forces are repeatedly arising in the context.3).Solution: Refine the model by adjusting relationships, adding
This is a proven solution of the problem. The solution is missing classes or attributes, and correcting any
inaccuracies. - Validate the model against the system's running on the bank server that handles transaction
requirements and specifications. 7. Documentation and processing, account verification, and other banking
Reporting: - Document the reverse engineering process, operations. - Database: Represents the database system
including the methodologies used and tools employed. that stores customer account information, transaction
Q.2] What is meant by Subsystem in System Design? records, and other relevant data. 3. Associations: -
Explain Breaking of System into Subsystems and Between ATM Machine and ATM Software: Represents
Allocation of Subsystems. In system design, a subsystem the association between the physical ATM machine and
is a smaller, self-contained unit within a larger system the software running on it. - Between ATM Machine and
that performs specific functions or provides services. Bank Server: Represents the communication channel
Breaking a system into subsystems involves dividing its between the ATM machine and the bank server for
functionalities into smaller, manageable units. This transaction processing and account verification. -
approach offers modularity, flexibility, ease of Between Bank Server and Database Server: Represents
maintenance, and scalability. The steps for breaking a the connection between the bank server and the
system into subsystems and allocating them are: 1. database server to access customer account information.
Identify Functionalities: Identify and group the required 4. Dependencies: - Between ATM Software and Banking
functionalities or modules. 2. Define Subsystem System: Represents the dependency of the ATM software
Boundaries: Determine the inputs, outputs, and on the banking system for transaction processing and
interfaces of each subsystem. 3. Analyze Dependencies other banking operations. - Between Banking System and
and Interactions: Analyze how subsystems interact and Database: Represents the dependency of the banking
exchange data. 4. Allocate Subsystems: Assign system on the database to retrieve and update customer
functionalities to subsystems based on responsibilities account information.
and interactions. 5. Establish Interfaces: Define clear Q.7] Explain with Example Application Analysis.
interfaces for communication and data exchange. 6. >>>Application analysis refers to understanding and
Design and Develop Subsystems: Develop each analyzing the requirements, functionalities, and
subsystem independently, focusing on its specific constraints of a software application. It involves studying
functionality. 7. Integration and Testing: Integrate and the application's purpose, stakeholders, user needs, and
test the subsystems together to verify their proper business objectives to identify necessary features and
functioning. specifications. For example, in a project management
Q.3] What are Categories of External Control? Explain in application: 1. Purpose and Objectives: Understand that
Detail. External control refers to the mechanisms by the application helps teams manage projects, with
which external entities interact with and control a objectives like task management, team collaboration,
system. The four main categories of external control are: progress tracking, and reporting. 2. Stakeholder
1. User Interface Control: Provides a user-friendly Identification: Identify stakeholders such as project
interface for input and feedback, allowing users to initiate managers, team members, clients, and executives. 3.
actions and provide data through buttons, menus, and User Needs: Analyze the needs of user groups; project
forms. 2. System Configuration Control: Allows system managers need task assignment and scheduling, team
administrators to configure and customize the system's members need task updates and communication, clients
behavior by setting parameters and preferences based on need progress reports. 4. Functionalities and Features:
specific needs. 3. External Device Control: Manages input Identify key functionalities like task creation, document
and output devices like keyboards, printers, and sensors, sharing, communication, time tracking, and reporting. 5.
allowing the system to interact with external devices for Use Cases and Scenarios: Develop use cases, such as a
data input and output. 4. System Integration Control: project manager assigning tasks, and scenarios, like a
Focuses on integrating the system with external systems, team member updating task progress. 6. Constraints and
enabling data exchange, message passing, and Dependencies: Identify constraints like technical
communication with other software or hardware limitations, integration needs, and security
components. considerations. 7. User Interface and Design: Create
Q.6] DRAW DEPLOYMENT DIAGRAM FOR ATM wireframes or mockups and refine them based on user
SYSTEM.>>> 1. Nodes: - ATM Machine: Represents the feedback. 8. Documentation: Document findings,
physical device where the ATM software is installed and requirements, use cases, and other information for
executed. - Bank Server: Represents the server at the reference by the development team and stakeholders.
bank's data center that communicates with the ATM Q.10] Explain Software Control Strategy. Software
machine. - Database Server: Represents the server where control strategy refers to the approach used to manage
the ATM system's database is hosted. 2. Components: - the execution and behavior of software components in a
ATM Software: Represents the software running on the system. Key aspects of software control strategy include:
ATM machine that allows users to interact with the 1. Control Flow: Defines the sequence of operations,
system. - Banking System: Represents the software including conditional branching, loops, function calls, and
exception handling. 2. Event Handling: Defines how manage the execution, behavior, and flow of software
events or user inputs are detected, processed, and components. Key aspects include: 1. Control Flow:
responded to within the system using event-driven Defines the order of instructions, branching, loops, and
programming. 3. Error Handling: Includes mechanisms for exception handling. 2. Event Handling: Manages how
error detection, reporting, and recovery, such as logging events and user inputs are detected and processed. 3.
errors and exception handling routines. 4. Error Handling: Involves detection, reporting, and
Synchronization and Concurrency: Ensures proper recovery mechanisms for errors. 4. Synchronization and
coordination of concurrent processes to avoid race Concurrency: Ensures coordination in multi-threaded or
conditions and deadlocks using techniques like locks and distributed systems to prevent issues. 5. Resource
semaphores. 5. Resource Management: Involves Management: Manages system resources like memory,
managing system resources like memory and network network, and files efficiently. 6. State Management:
connections to ensure efficient usage and avoid resource Handles transitions between different states or modes of
leaks. 6. State Management: Defines how the system operation.
transitions between different states and handles state- Q.11] EXPLAIN SYSTEM DESIGN. System design is a phase
specific behavior, often using state machines. in software development where the system's structure
Q.11] Explain System Design. System design is a phase in and behavior are defined. Key steps include: 1.
software development where the system's structure and Architecture Design: Defines the system's high-level
behavior are defined. Key aspects of system design structure and components. 2. Component Design: Breaks
include: 1. Architecture Design: Defines the system's the system into manageable components with specific
high-level structure, components, and communication responsibilities. 3. Module Design: Designs the internal
channels. 2. Component Design: Breaks down the system structure and logic of each component. 4. Interface
into manageable components, assigning specific Design: Specifies how components communicate,
responsibilities and interactions. 3. Module Design: including methods and data formats. 5. Data Design:
Focuses on the internal structure and logic of each Designs data storage, models, and security requirements.
component, ensuring cohesion and reusability. 4. 6. Security and Performance Considerations: Addresses
Interface Design: Specifies communication methods and access control, encryption, and performance. 7.
data formats between components. 5. Data Design: Documentation: Provides detailed documentation for
Organizes and stores data, creating models or schemas to developers, testers, and maintenance.
represent it. 6. Security and Performance: Incorporates Q.12] WRITE SHORT NOTE ON I) HANDLING BOUNDARY
security measures and optimizes performance, CONDITIONS II) SETTING TRADE-OFF PRIORITIES. i)
considering scalability. 7. Documentation: Provides Handling Boundary Conditions: Identify system
detailed design documentation, including diagrams and input/output limits and thresholds. Implement checks for
specifications for future reference. extreme cases like null inputs or maximum values. Ensure
Q.4] Explain in Detail Components of a Component correct behavior to avoid crashes or incorrect results.
Diagram. A component diagram in UML represents the Test with boundary inputs to ensure system stability. ii)
components, dependencies, interfaces, and relationships Setting Trade-off Priorities: Identify conflicting system
within a system. Key components of a component requirements. Prioritize factors like functionality,
diagram include: 1. Component: Represents a modular, performance, and cost. Consider project goals,
reusable unit with related functionalities. It is depicted as stakeholder needs, and available resources.
a rectangle with the component's name inside. 2. Communicate with stakeholders to understand their
Interface: Defines the operations exposed by a priorities. Make informed decisions while optimizing the
component for interaction, shown as circles connected to system outcome.
the component. 3. Dependency: Represents the Q.13] DEFINE REFUSE PLAN EXPLAIN IN BRIEF THE
relationship where one component depends on another, FOLLOWING TERMS WITH RESPECT TO REFUSE PLAN: A.
shown as arrows pointing to the dependent component. LIBRARY B. FRAMEWORK C. PATTERN. A refuse plan is a
4. Relationship: Describes associations between strategy or approach adopted to handle or manage the
components, such as associations, aggregations, and rejection or exclusion of certain components, features, or
generalizations. 5. Ports: Connection points on a functionalities in a software system. It involves making
component for interaction with others, depicted as small conscious decisions to exclude specific elements from the
squares or circles. 6. Artifacts: Represent physical files, system's design or implementation based on various
libraries, or executables associated with components. 7. considerations such as feasibility, requirements,
Notation and Stereotypes: Additional symbols like <>, <>, priorities, or resource constraints. a. Library: - A library is
or <> classify components based on their role. a collection of precompiled and reusable code modules or
functions. - It provides specific functionalities that can be
Q.10] EXPLAIN SOFTWARE CONTROL STRATEGY. utilized by software developers. - Libraries promote code
Software control strategy refers to the approach used to reuse, simplify development, and improve efficiency. - In
a refuse plan, a library may be excluded if it is dynamic simulation can be modeled easily using the
unnecessary for the system's requirements. - Exclusion object oriented approach. Because the objects and their
may also occur if it introduces unnecessary complexity or interactions can be identified directly from the
conflicts with chosen components. b. Framework: - A application. There are two ways to implement control in
framework is a software platform or infrastructure that dynamic simulation - 1) Explicit external controller
provides a foundation for application development. - It controlling the objects of the application and 2) Objects
includes a set of libraries, tools, and predefined that exchange information among themselves. 5).Real-
structures. - Frameworks offer standardized approaches time System:-User Application Analysis and System.the
and common functionalities. - They enable developers to Real time system is an interactive system with strict time
build applications more efficiently. - In a refuse plan, a constraint on actions. There are two types of real time
framework may be excluded if it does not align with the systems Hard real time system and soft real time system
system's architectural goals. - Exclusion may also happen In hard real time system, the software must be highly
if it imposes unnecessary restrictions or is incompatible reliable and the response must be within the specified
with chosen technologies. c. Pattern: - A pattern is a time constraint. It includes the critical applications. **In
proven solution or design approach to a recurring soft real time system also the software must be highly
problem in software development. - Patterns provide reliable but occasion violation of timing constraint is
reusable templates or guidelines for solving common allowed (6).Transaction Manager:_Transaction manager is
design challenges. - They capture best practices and a kind of system in which the main objective is to store
establish a common language among developers. - In a and retrieve data.Transaction manager deals with the
refuse plan, specific design patterns may be excluded if systems in which multiple users read or write data
they don't fit well with the system's requirements. - simultaneously, limb d ne nous at bas s The transaction
Exclusion may also occur if they introduce unnecessary manager offers the security from unauthorized access to
complexity or aren't applicable to the chosen architecture data or loss in of datapig nousumi imam ni lostno in o The
or technology stack transaction manager often lie on the top of the database
Q7).Architectural Style:-1).Batch transformation :- management systems. For example railway reservation
performs the sequential computations. In this systems, online banking systems.The class model is the
architectural style, the application gets some input and most important modeling for transaction manager
the answer is computed. There is no interaction with UNIT 5
outside world. For example compilers, payroll systems
make use of batch transformation Q.2) What is Abstraction? Explain Different Categories of
architecture.**Creating state model for the applications Abstraction. Abstraction is the process of simplifying
that use batch transformations is of no use. **But the complex systems by focusing on essential features while
class model for such applications is very important. The hiding unnecessary details. It helps manage complexity,
interaction model can also be created for such promotes modular design, and enhances code reusability.
architectural style by documenting the computations and 1. Data Abstraction: Focuses on representing data
using the class model. **The goal of batch transformation objects by defining abstract data types (ADTs) that specify
is to define clean sequence of steps. 2)Continuous operations without revealing internal details. Examples:
Transformation:- In this architectural style the output Classes, interfaces, structures. 2. Procedural Abstraction:
varies when the input is getting changed. The output is Encapsulates complex operations or algorithms into
continuously updated.**Due to the limitation of time, functions or procedures. Promotes code reuse,
computing entire set of output is not possible a time, modularity, and separation of concerns. 3. Control
instead of that the output is computed incrementally. The Abstraction: Simplifies control flow by creating higher-
applications that make use of continuous transformation level constructs like loops, conditionals, and subroutines.
architectural style incremental compilers, windowing Enhances program readability and logic organization. 4.
systems, system monitoring system processing system. Modular Abstraction: Divides systems into independent
The class and interaction models are created for modeling modules with specific functionality, interacting through
the important classes in interactions. 3)Interactive defined interfaces. Improves organization, reusability,
Interface:- In this type of architectural style the and maintainability. 5. Hierarchical Abstraction:
interactions between the system and the external devices Structures components hierarchically, with higher levels
are represented.**The external devices are independent for broad functionality and lower levels for details. Helps
of the system system can not control them. **This type of manage complexity and facilitates system architecture
architectural style includes only some part of the entire understanding.
application. For example query interface, control panel
for simulation. 4).Dynamic Simulation:-The dynamic Q.3) Give Detailed Guidelines for Finding and Defining
simulation models mimic the real-world objects. For Classes Involved in Software System Scenario. 1. Identify
example - Creating economic models, video games. The Nouns: List nouns in the scenario as potential class
names, e.g., User, Account, Transaction. 2. Analyze
Verbs: Identify verbs representing actions or behaviors, package extending a class in another, representing an "is-
e.g., ProcessPayment, UpdateInventory. 3. Apply Single a" relationship where the derived class inherits and
Responsibility Principle: Define classes for specific possibly overrides base class functionality. 4. Interface
responsibilities, avoiding unrelated duties, e.g., Dependency: Arises when a class in one package
AccountManager, PaymentProcessor. 4. Identify implements an interface from another, ensuring the class
Associations: Determine relationships among entities, adheres to the interface’s contract for loose coupling and
e.g., User associated with Account. 5. Consider abstraction. 5. Circular Dependency: Occurs when two or
Encapsulation: Group related data and behaviors, e.g., more packages depend cyclically on each other, leading
Account with balance and transaction history. 6. Focus on to compilation issues and maintenance challenges.
Reusability: Abstract common functionalities into
reusable classes, e.g., Logger for system-wide logging. 7. Q.6) Discuss How You Identify Use Cases and Actors with
Use Inheritance and Polymorphism: Share common traits Respect to Use Case Diagrams. 1. Identify Use Cases:
via base and derived classes, e.g., User as base, Customer Analyze system requirements and user stories to
and Admin as subclasses. 8. Validate and Refine: determine main functionalities or tasks. Look for user
Reevaluate class responsibilities and adjust as needed for goals and system responses like creating, updating, or
system relevance. 9. Use Design Principles: Apply SOLID deleting data. Focus on key interactions or specialized
principles and patterns like MVC to address specific tasks. 2. Identify Actors: Identify external entities
challenges. 10. Collaborate and Review: Engage interacting with the system, such as users, other systems,
stakeholders for feedback and align designs with system or devices. Define their roles, responsibilities, goals, and
objectives. any constraints or dependencies they have on the system.
3. Establish Relationships: Link actors to use cases they
Q.4) What Do You Mean by System Design? Explain with interact with or initiate. Use associations to represent
Suitable Example. System Design: It is the process of communication or involvement between actors and use
defining the architecture, components, modules, cases. 4. Refine and Validate: Seek feedback from
interfaces, and other system characteristics to translate stakeholders to refine and validate use cases and actors.
requirements into a structured and functional system Ensure all relevant functionalities are captured and actors
design. Example: Online Shopping System 1. System correctly represent external entities and their
Architecture: Define the overall structure like client- interactions.
server model with components such as user interface,
application server, database server, and external services. Q.7) Elaborate Class Design with Suitable Example. 1.
2. Component Design: Identify components like user Identify Objects and Relationships: Identify main objects
management, product catalog, shopping cart, payment like Customer, Product, Cart, Order, Payment. Define
gateway, and order processing. 3. Interface Design: relationships like Customer has a Cart, Cart contains
Define interactions and protocols between components, Products, Order links Customer and Products. 2. Define
e.g., user interface communicates with product catalog Class Structure: Create classes with attributes and
for displaying items. 4. Database Design: Create schema methods: - Customer: Attributes: name, email, address.
and tables for data like user details, products, carts, and Methods: register(), login(), placeOrder(). - Product:
orders while maintaining relationships and constraints. 5. Attributes: name, price, description. Methods:
Security Design: Implement authentication, encryption, getDetails(), addToCart(). - Cart: Attributes: products.
and secure communication to protect sensitive data. 6. Methods: addProduct(), removeProduct(),
Performance and Scalability Design: Optimize queries, calculateTotal(). - Order: Attributes: customer, products,
use caching, and scalable infrastructure for handling user orderDate. Methods: generateInvoice(),
loads. 7. Error Handling: Plan error codes, logging, and confirmPayment(). - Payment: Attributes:
notifications for efficient issue resolution. 8. Testing and paymentMethod, amount. Methods: processPayment().
Quality Assurance: Use unit, integration, system, 3. Specify Class Methods and Properties: Examples: -
performance, and security testing to ensure quality. 9. Customer: register() for new registration, login() for
Documentation: Prepare architecture diagrams, database authentication, placeOrder() for order creation. - Product:
schemas, and component specifications for reference. getDetails() for product info, addToCart() to add a
product. - Cart: addProduct() to add, removeProduct() to
Q.5) List and Explain Different Types of Dependencies in remove, calculateTotal() for cart cost. - Order:
Package. 1. Package Dependency: Occurs when one generateInvoice() for invoice, confirmPayment() for
package relies on another by importing its classes, payment confirmation. - Payment: processPayment() for
interfaces, or resources, e.g., Package A depends on handling payments. 4. Define Relationships and
Package B for functionality. 2. Class Dependency: Associations: Establish links like Customer (1-to-1) Cart,
Happens when classes in a package depend on classes Cart (1-to-many) Products. 5. Consider Inheritance and
from other packages by referencing objects, methods, or Polymorphism: Abstract common features like Customer
fields. 3. Inheritance Dependency: Involves a class in one
and Admin under a User superclass with shared attributes Q.10) Explain Class Design of College Library System. 1.
(e.g., username, password). Class: Library: Represents the library. Attributes: name,
location. Methods: addBook(), removeBook(),
Q.8) Explain Legacy System. Definition: A legacy system searchBook(), borrowBook(), returnBook(). 2. Class: Book:
is an old software application or technology still in use, Represents a book in the library. Attributes: title, author,
which is outdated compared to modern technologies and ISBN, available. Methods: getTitle(), getAuthor(),
may face compatibility, maintenance, and scalability getISBN(), isAvailable(). 3. Class: Member: Represents a
issues. Characteristics: 1. Aging Technology: Built on library member. Attributes: name, ID. Methods:
outdated platforms or languages no longer widely used or getName(), getID(). 4. Class: Librarian: Represents a
supported. 2. Lack of Documentation: Limited or librarian. Attributes: name. Methods: addBook(),
outdated documentation makes it hard for new removeBook(), searchBook(), generateReport().
developers to modify. 3. Monolithic Architecture:
Complex and tightly coupled components. 4. Outdated Q.11) Explain Building the Interaction Model. Definition:
User Interface: May have old, non-user-friendly The interaction model captures how components and
interfaces. 5. Limited Integration: Difficult to connect actors in a system interact to perform specific tasks. It
with modern technologies. 6. Maintenance Challenges: includes identifying interactions, specifying messages,
Expensive and time-consuming to maintain due to and modeling the flow of information. Steps to Build the
complexity and outdated tech. Challenges: 1. Interaction Model: 1. Identify Interactions: Analyze
Compatibility: May not work with new hardware or system requirements and use cases to identify key
software. 2. Scalability: Cannot easily scale to meet interactions and sequence of actions for system
growing user demands. 3. Security Risks: Vulnerable to functionalities. 2. Specify Messages: Define the messages
security threats due to outdated standards. 4. Skill Gap: exchanged between components and actors, including
Difficulty in finding developers skilled in older content, format, and structure like data, requests,
technologies. Modernization Approaches: 1. Rewriting: responses, and notifications. 3. Model the Flow of
Rebuilding from scratch using modern tech. 2. Information: Use sequence or communication diagrams
Replatforming: Moving to a new platform or to represent message flow and interactions. Sequence
infrastructure, like cloud hosting. 3. Refactoring: diagrams show the chronological order, while
Incremental changes to improve design and communication diagrams depict structural relationships
maintainability. 4. Wrapping: Creating an interface between components and actors. 4. Define Behavior and
around the legacy system to connect it with modern Actions: Specify the operations or methods that
applications. components or actors perform during interactions to
accomplish tasks or respond to messages. 5. Validate and
Q.9) Explain Implementation Modeling. Definition: Refine: Review the interaction model against system
Implementation modeling is the phase in SDLC where requirements and use cases to ensure it accurately
design specifications are transformed into executable represents the system’s behavior and make necessary
code. It involves coding, integrating components, and refinements. 6. Collaborate with Stakeholders: Gather
performing unit tests to ensure the software works as feedback from system users, developers, and domain
intended. Steps in Implementation Modeling: 1. experts to ensure the interaction model meets
Translation of Design: Transform design documents like stakeholder needs and reflects the intended system
class diagrams and sequence diagrams into actual code behavior.
using programming languages such as Java or Python. 2.
Writing Code: Developers write the code based on the Q.12) Write short note on i) Fine-tuning Classes ii) Fine-
design specifications using appropriate languages, tuning Generalization.
frameworks, and libraries. 3. Component Integration: i) Fine-tuning Classes: 1. Responsibility: Refine the class
Components are integrated and tested for proper responsibilities to ensure each class has a clear, single
functionality and data flow. 4. Unit Testing: Tests are purpose. 2. Cohesion: Ensure that methods and attributes
performed on individual components to check for bugs within a class are related and work towards a common
and ensure correct operation. 5. Code Documentation: goal. 3. Encapsulation: Hide implementation details and
Developers write comments and documentation to expose only necessary interfaces to protect class
explain the functionality and usage of the code. 6. integrity. 4. Naming Conventions: Use meaningful and
Version Control: Tools like Git are used to manage descriptive names for classes, methods, and attributes for
changes and versions of the code, ensuring collaboration better readability. 5. Code Reusability: Extract common
and tracking. 7. Code Review: Code is reviewed by peers functionality into reusable components or base classes to
to identify errors, improve quality, and ensure adherence improve reusability.
to coding standards. ii) Fine-tuning Generalization: 1. Inheritance Hierarchies:
Optimize the inheritance hierarchy for clarity and
maintainability. 2. Generalization Relationships: Ensure
derived classes accurately specialize the behavior of base process and generate reports to communicate the
classes. 3. Abstract Classes and Interfaces: Use abstract findings.
classes or interfaces to define common behaviors and
contracts. 4. Polymorphism: Enable interchangeable use Q.16) What is the difference between forward and
of related classes via polymorphism. 5. Overriding and reverse engineering?
Overloading: Review method overriding and overloading Forward Engineering: 1. Objective: Forward engineering
to ensure proper behavior and adherence to principles. is the traditional approach of software development,
where a software system is built from scratch based on
Q.13) Why class design is prepared? Explain the requirements and specifications. 2. Process: It involves
following concepts with respect to class design: A) designing and implementing the software starting from
Bridging Gaps B) Designing Algorithms C) Design requirements analysis, followed by system design, coding,
Optimization. testing, and deployment. 3. Starting Point: Forward
Class design is prepared to define the structure and engineering begins with conceptualization, requirement
behavior of individual classes, transforming requirements gathering, and designing the system architecture. 4.
into concrete, reusable, and maintainable code. A) Outcome: The outcome is the creation of a new software
Bridging Gaps: Class design bridges the gap between system, starting from initial stages and progressing
high-level design and actual implementation, ensuring the towards a fully functional product.
system requirements are met with concrete classes and Reverse Engineering: 1. Objective: Reverse engineering
methods. B) Designing Algorithms: Class design involves aims to understand an existing software system by
creating algorithms within classes to define step-by-step analyzing its structure, behavior, and functionality. 2.
procedures to implement specific operations and Process: It involves examining the source code or
behaviors. C) Design Optimization: Class design allows for compiled artifacts of an existing system to extract
refining structures, relationships, and decisions to information about its design, architecture, and
improve performance, reduce inefficiencies, and enhance implementation details. 3. Starting Point: Reverse
maintainability and readability. engineering starts with an existing software system and
works backward to understand its structure and inner
Q.14) Explain the following terms in relation to class workings. 4. Outcome: The outcome is a model or
design: A) Refactoring B) Reification. representation of the existing system, such as class
A) Refactoring: 1. Restructuring existing code without diagrams, sequence diagrams, or other visual artifacts.
changing its external behavior. 2. Improves code quality
and maintainability. 3. Includes techniques like renaming Data Dictionary for ATM System (Short Version)
variables, simplifying complex logic, and eliminating
duplication. 4. Aims to keep the codebase clean and Data Element Type Description
adaptable. B) Reification: 1. Transforming abstract 16-digit ATM card
concepts into concrete implementations. 2. Represents CardNumber Integer
number.
abstract concepts as concrete classes, attributes, or
4-6 digit user
methods. 3. Bridges the gap between conceptual models PIN Integer
authentication code.
and implementation. 4. Facilitates interaction with real-
world entities through tangible code. Unique account
AccountNumber Integer
identifier.
Q.15) Explain the process of building a class model Type of account
AccountType String
during reverse engineering. (Savings/Current).
System Understanding: Gain a clear understanding of the Balance Float Current account balance.
software system being reverse-engineered. 2. Source Unique transaction
Code Analysis: Analyze the source code to identify TransactionID String
identifier.
classes, attributes, methods, and relationships. 3. Class
Type of transaction
Identification: Document the classes, their attributes, and TransactionType String
methods, and classify them based on responsibilities. 4. (Withdraw/Deposit).
Relationship Identification: Identify relationships such as Amount Float Transaction amount.
associations, dependencies, and inheritance. 5. Date and time of
TransactionDateTime DateTime
Documentation and Visualization: Create diagrams to transaction.
represent the class model, ensuring clarity and ReceiptNumber String Unique receipt identifier.
organization. 6. Refinement and Validation: Review and Unique ATM machine
refine the model for accuracy, completeness, and ATMID String
identifier.
alignment with system requirements. 7. Documentation
and Reporting: Document the reverse engineering Physical location of the
ATMLocation String
ATM.
Data Element Type Description Card and Account classes are distinct and have clear
BankName String Name of the bank. responsibilities.
Unique session UNIT 6
SessionID String
identifier.
Authentication result Q.1] EXPLAIN I) CREATIONAL PATTERNS. II) STRUCTURAL
AuthenticationStatus Boolean
(True/False). PATTERNS. III) BEHAVIORAL PATTERNS. i) Creational
Max withdrawal per Patterns: - Creational patterns focus on object creation
WithdrawalLimit Float
transaction. mechanisms. - They provide ways to create objects in a
Max deposit per flexible and reusable manner. - Examples of creational
DepositLimit Float patterns include Singleton, Factory Method, Abstract
transaction.
Factory, Builder, and Prototype patterns. - These patterns
Message for errors
ErrorMessage String help in managing the creation process, ensuring proper
during transactions.
initialization, and providing a centralized point of control
for object creation. ii) Structural Patterns: - Structural
Guidelines for Finding and Defining Classes in a Software
patterns deal with object composition to form larger
System Scenario Identify Nouns in the Requirements:
structures while keeping them flexible and efficient. -
Review system requirements, use cases, and scenario
They focus on organizing classes and objects to form
descriptions to identify nouns representing key entities or
larger structures. - Examples of structural patterns
objects. Example: In an ATM system, nouns like
include Adapter, Decorator, Composite, Proxy, and
Customer, ATM, Card, Account, and Transaction are
Facade patterns. - These patterns facilitate code reuse,
potential classes. Identify Actors and Roles: Determine
enhance code flexibility, and improve the interaction
who or what interacts with the system (actors) and their
between objects. iii) Behavioral Patterns: - Behavioral
roles. Example: In a reservation system, actors like
patterns are concerned with the interaction and
Customer and Admin may serve as classes. Look for
communication between objects. - They define the
Responsibilities: Identify entities that have specific
behavior and communication patterns among objects. -
responsibilities or perform key functions in the system.
Examples of behavioral patterns include Observer,
Example: In an ATM system, the Account class manages
Strategy, Template Method, Command, and Iterator
balance and transactions. Identify Relationships and
patterns. - These patterns help in managing complex
Associations: Determine which entities are related or
behavior, promoting loose coupling between objects, and
interact with each other (associations, dependencies, or
improving the maintainability of the system.
aggregations). Example: In a banking system, a Customer
class is associated with multiple Account classes. Check Q.2] DISCUSS ADAPTER DESIGN PATTERN. The Adapter
for Attributes and Methods: Consider properties Design Pattern is a structural design pattern that allows
(attributes) and functions (methods) for each potential incompatible interfaces of classes to work together. It
class. Example: The Account class may have attributes like acts as a bridge between two incompatible interfaces,
accountNumber and balance, and methods like debit() converting the interface of one class into another
and credit(). Use CRC (Class-Responsibility-Collaborator) interface that clients expect. This pattern enables objects
Cards: Create CRC cards for each class to outline with different interfaces to collaborate by providing a
responsibilities and collaborations. Example: The ATM common interface. Key Components of the Adapter
class collaborates with the BankSystem class to process Design Pattern: 1. Target: Defines the interface that the
transactions. Identify Generalizations and Specializations: client expects to interact with. 2. Adaptee: Represents the
Look for hierarchical relationships (inheritance) where existing class with an incompatible interface that needs to
one class is a specialized version of another. Example: A be adapted. 3. Adapter: Implements the target interface
SavingsAccount class and CurrentAccount class can and acts as a wrapper around the adaptee. It translates
inherit from a general Account class. Consider System the requests from the client into calls to the adaptee's
Events: Identify classes that respond to or generate interface. Benefits of the Adapter Design Pattern: 1.
system events. Example: In an ATM system, an event like Reusability: It allows reuse of existing classes that have
Withdraw Cash involves the ATM, Account, and incompatible interfaces by adapting them to work with
Transaction classes. Avoid Over-Specification: Focus on other classes. 2. Interoperability: It enables
key entities and avoid defining too many classes. communication and collaboration between classes with
Example: Instead of separate classes for different interfaces, promoting interoperability. 3.
WithdrawalTransaction and DepositTransaction, use a Flexibility: It provides a flexible solution to integrate new
general Transaction class. Refactor and Validate: Review classes or components into existing systems without
and refine classes to ensure they are cohesive, modifying their interfaces. 4. Simplified Client Code:
independent, and meet requirements. Example: Ensure Clients can interact with the target interface, oblivious to
the underlying complexity of adapting the adaptee.
Example: Suppose you have an existing application that application. It provides a high-level view of the system's
interacts with a legacy database using a specific database architecture and helps in understanding the modular
connector. Now, you want to switch to a new database structure of the system. The following are the key
system that requires a different connector interface. components of a component diagram: 1. Component: A
Instead of modifying the existing application code to work component represents a modular, independent, and
with the new connector, you can create an adapter class reusable unit within a system. It encapsulates a set of
that implements the target interface expected by the related functionalities and provides well-defined
application. This adapter class would internally use the interfaces for interaction. Components are represented
new connector's interface to communicate with the new as rectangles with the component's name written inside.
database. This way, the existing application can 2. Interface: An interface defines the contract or set of
seamlessly work with the new database through the operations that a component exposes for interaction. It
adapter, without any modifications to its code. specifies the methods, properties, and events that can be
accessed by other components. Interfaces are depicted as
Q.3] WHAT ARE CATEGORIES OF EXTERNAL CONTROL? circles connected to the component they belong to. 3.
EXPLAIN IN DETAIL. In system design, external control Dependency: Dependency represents the relationship
refers to the mechanisms or methods by which external between components where one component depends on
entities interact with a system and control its behavior. another. It indicates that a change in one component may
There are different categories of external control, each affect the behavior or functionality of the dependent
serving a specific purpose. Here are four common component. Dependencies are shown as arrows pointing
categories of external control: 1. User Interface Control: from the dependent component to the component it
User Interface Control involves providing a user-friendly depends on. 4. Relationship: Relationships describe the
interface through which users can interact with the associations and connections between components.
system. It includes input mechanisms such as buttons, Some common types of relationships in component
menus, forms, and graphical elements that enable users diagrams include associations, aggregations,
to provide instructions or input data to the system. User compositions, and generalizations. They depict how
Interface Control allows users to initiate actions, provide components interact and collaborate with each other. 5.
preferences, and receive feedback from the system. 2. Ports: Ports represent the connection points on a
System Configuration Control: System Configuration component that allow it to interact with other
Control refers to the ability to configure and customize components or external entities. Ports are usually
the system's behavior according to specific requirements. depicted as small squares or circles on the boundaries of
It involves setting system parameters, options, and the component. 6. Artifacts: Artifacts are used to
preferences that determine how the system functions. represent physical files, libraries, executables, or other
System administrators or authorized users can modify tangible elements associated with components. They can
these settings to adapt the system to different be shown as icons or symbols attached to the
environments or to align with specific needs. 3. External component. 7. Notation and Stereotypes: Component
Device Control: External Device Control involves diagrams may include additional notations and
managing and controlling external devices or peripherals stereotypes to provide additional information about the
connected to the system. This category includes components. Stereotypes such as <>, <>, or <> can be
controlling input devices like keyboards, mice, scanners, used to classify components based on their purpose or
and sensors, as well as output devices like printers, role in the system
displays, and actuators. The system interacts with these
devices to receive input data, provide output information, Q.3] DISCUSS OBSERVER DESIGN PATTERN. The Observer
or perform actions. 4. System Integration Control: System Design Pattern is a behavioral design pattern that
Integration Control focuses on the integration and establishes a one-to-many dependency between objects,
coordination of the system with external systems or so that when one object (called the subject or observable)
components. This category includes mechanisms for data changes its state, all its dependents (called observers) are
exchange, message passing, or remote procedure calls automatically notified and updated. This pattern enables
between different systems. It enables the system to loose coupling between objects and allows for easy
communicate with external systems, access external communication and synchronization of state changes. Key
resources, or coordinate activities with other software or Components of the Observer Design Pattern: 1. Subject
hardware components. (Observable): Represents the object that is being
observed. It maintains a list of observers and provides
Q.4] EXPLAIN IN DETAIL COMPONENTS OF A methods for adding, removing, and notifying observers. 2.
COMPONENT DIAGRAM. A component diagram is a type Observer: Defines an interface or abstract class that
of UML (Unified Modeling Language) diagram that specifies the update method. Observers register
represents the components, their dependencies, themselves with the subject to receive updates. 3.
interfaces, and relationships within a system or Concrete Subject: Extends the subject class and provides
the implementation for managing the list of observers outlining structures and interactions. 5. Participants:
and notifying them of state changes. 4. Concrete Different classes or objects involved in the pattern,
Observer: Implements the observer interface and defines fulfilling specific roles. 6. Collaborations: How
the specific behavior to be executed when notified of a participants interact to achieve the pattern's goals. 7.
state change. Benefits of the Observer Design Pattern: 1. Consequences: Benefits and trade-offs of using the
Loose Coupling: The subject and observers are loosely pattern, including advantages and drawbacks. 8.
coupled, as they depend on abstractions rather than Example: Concrete instances showing the pattern's
concrete implementations. 2. Dynamic Relationships: application and impact.
Observers can be added or removed at runtime, allowing
for dynamic relationships between objects. 3. Reusability: Q.6] EXPLAIN STRATEGY DESIGN PATTERNS. The Strategy
The pattern promotes reusability, as new observers can design pattern is a behavioral pattern that enables
be easily added without modifying the subject or existing selecting an algorithm at runtime. It defines a family of
observers. 4. Event-driven Architecture: It is well-suited interchangeable algorithms and encapsulates them in
for event-driven systems, where objects need to react to separate classes, allowing algorithms to vary
changes in state. Example: Consider a stock market independently of the clients using them. Key
scenario where a stock exchange (subject) provides real- components: 1. Context: Represents the client, holds a
time updates on stock prices. Multiple investors reference to the Strategy object, and provides a method
(observers) are interested in receiving these updates. The to set the strategy. 2. Strategy: Defines the common
stock exchange maintains a list of registered investors interface for all algorithms. 3. Concrete Strategies:
and notifies them whenever there is a change in stock Implement the specific algorithms. Benefits: 1. Flexibility:
prices. The investors can then take appropriate actions Switch algorithms at runtime without altering client code.
based on the updated information, such as buying or 2. Encapsulation: Each algorithm is encapsulated in its
selling stocks. In this example, the stock exchange is the own class. 3. Extensibility: New strategies can be added
subject, the investors are observers, and the update easily. 4. Testability: Each strategy can be tested
method is called whenever there is a change in stock independently. Example: In a sorting program, different
prices. sorting algorithms (e.g., bubble sort, quick sort) can be
encapsulated into separate classes, and the Context class
Q.4] WHAT IS DESIGN PATTERN? WHAT MAKES DESIGN selects the desired algorithm.
PATTERN? EXPLAIN DIFFERENT TYPES OF DESIGN
PATTERN. A design pattern is a reusable solution to a Q.7] EXPLAIN IDIOMS AND STYLE. Idioms and style are
common problem in software design. It provides a proven important aspects of software development that
approach to solve similar problems in different contexts, contribute to the readability, maintainability, and
promoting modular, flexible, and scalable software. consistency of code. Here's a pointwise explanation of
Factors making a design pattern: 1. Problem: It addresses each term: Idioms: 1. Programming Idioms: - Efficient
specific design issues in software development, like Solutions: Idioms provide efficient and proven solutions
object creation or interaction. 2. Solution: It offers an to common programming problems, allowing developers
effective solution with guidelines and principles. 3. to leverage established patterns and techniques. -
Context: It is applied to specific scenarios, considering Language-specific: Idioms are often specific to a particular
requirements and constraints. Types of Design Patterns: programming language, taking advantage of language
1. Creational Patterns: These focus on object creation, features and constructs. - Best Practices: Idioms
like Singleton, Factory Method, Abstract Factory, Builder, represent best practices in coding, reflecting industry
and Prototype patterns. 2. Structural Patterns: These deal standards and community consensus on how to tackle
with organizing classes and objects into larger structures, common programming challenges. 2. Design Idioms: -
like Adapter, Decorator, Composite, Proxy, and Facade Reusable Patterns: Design idioms capture recurring
patterns. 3. Behavioral Patterns: These define design patterns and architectural principles that can be
interactions between objects, like Observer, Strategy, reused across projects, saving time and effort. - Address
Template Method, Command, and Iterator patterns. 4. Common Challenges: Design idioms address common
Architectural Patterns: These provide guidelines for design problems and provide effective strategies for
system structure, like MVC, Layered Architecture, and achieving separation of concerns, extensibility, and
Microservices Architecture. maintainability. - Shared Language: Using design idioms
facilitates communication among developers, allowing
Entities involved in design patterns include: 1. Pattern them to discuss and understand design decisions more
Name: A unique name that identifies the design pattern effectively. Style: 1. Coding Style: - Readability: A
for reference. 2. Intent: Describes the problem the consistent coding style enhances code readability, making
pattern solves and its purpose. 3. Problem: Explains the it easier for developers to understand and navigate
design challenge the pattern addresses. 4. Solution: through the codebase. - Maintainability: Following a
Describes the design approach to solve the problem, coding style promotes code maintainability as it
establishes conventions for naming, formatting, and developers. - Design Patterns: Many idioms are based on
organizing code. - Team Collaboration: A shared coding design patterns, so studying design pattern books and
style fosters collaboration within a development team, articles can provide valuable insights into commonly used
enabling seamless code integration and reducing idiomatic solutions.
conflicts. 2. Documentation Style: - Clarity: A consistent
documentation style ensures clear and understandable Q.10] EXPLAIN FOLLOWING DESIGN PATTERN
explanations of code functionality, enhancing the I)COMMAND PROCESSOR II) VIEW HANDLER. i)
understandability of the codebase. - Standardized Command Processor Design Pattern: The Command
Format: Following a documentation style provides a Processor design pattern is a behavioral pattern that
standardized format for documenting code, making it separates the execution of a command from the object
easier for developers to locate and understand relevant that invokes it. It encapsulates a request as an object,
information. - Improved Documentation Maintenance: A allowing the client to parameterize actions and make
clear and consistent documentation style simplifies the requests without knowing the specifics of the operation
process of updating and maintaining documentation over or the receiver. - Command: Represents a particular
time. action or request as an object. It encapsulates all the
necessary information for executing the request. -
Q.8] EXPLAIN FOLLOWING DESIGN PATTERN Invoker: Initiates the command and sends it to the
I) CLIENT-DISPATCHSERVER II) PUBLISH-SUBSCRIBER appropriate receiver for execution. - Receiver: Executes
>>>>i) Client-Dispatch-Server Design Pattern: This the command and performs the desired operation. -
pattern facilitates communication between multiple Client: Creates and configures the command objects, sets
clients and a server. Clients send requests to the server, the receiver, and assigns commands to invokers. The
and the server processes them and sends responses. The Command Processor pattern provides decoupling
dispatch mechanism routes client requests to the correct between the sender and receiver, allowing for flexibility
server component. The communication occurs through and extensibility. It enables the implementation of
protocols like HTTP, TCP/IP, or RPC. ii) Publish-Subscriber features like undo/redo functionality, logging, and
Design Pattern: This is a behavioral pattern that creates a queuing of commands. ii) View Handler Design Pattern:
one-to-many relationship between publishers and The View Handler design pattern is commonly used in
subscribers. Publishers produce events/messages without user interface development to handle user interactions
knowing the subscribers. Subscribers register to receive and events in a structured manner. It separates the view
notifications. The event/message bus connects them. This logic from the business logic, improving the
pattern allows dynamic registration and decouples maintainability and reusability of the code. - View:
publishers from subscribers. Represents the user interface elements or components
that the user interacts with. - Handler: Handles the events
Q.9] WHAT IS IDIOM ? WHAT CAN AN IDIOM PROVIDE ? or user actions triggered by the view components. -
WHERE TO FIND IDIOMS ? An idiom in software dAn Business Logic: Contains the core application logic and
idiom in software development is a widely used coding data processing. The View Handler pattern allows for a
pattern or technique that offers an efficient solution to a clean separation of concerns, where the view is
specific programming problem. Idioms are typically responsible for rendering the user interface, and the
language-specific and reflect best practices, conventions, handler manages the interactions and event processing. It
and patterns that are commonly accepted by the promotes modularity and makes the codebase easier to
programming community. 1) What Can an Idiom understand and maintain
Provide? - Efficiency: It helps create optimized, high-
performance solutions to common problems. - Q.11]Elements of a Design Pattern A design pattern is a
Reusability: Idioms provide patterns that can be reused in reusable solution to a common software design problem.
different contexts, making development faster and easier. The key elements include: Pattern Name: The name
- Maintainability: They ensure that code is easier to provides a way to identify and communicate the pattern
maintain and modify due to well-established practices. - easily. Examples include Singleton, Observer, or Factory
Readability: Idioms improve code readability, making it Method. Intent: Describes the purpose of the pattern and
easier for developers to understand the logic and flow of the specific problem it solves. Example: The Singleton
the code. - Consistency: Using idioms ensures a pattern ensures only one instance of a class exists.
consistent structure and style across the codebase, Context: Defines the situation in which the pattern is
helping teams work more effectively together. 2) Where applicable. Example: The Observer pattern is used when
to Find Idioms? - Language Documentation: Official multiple objects need to be notified of changes in another
documentation and books offer examples of idioms object. Problem: Describes the design issue or challenge
tailored to the specific language. - Community Resources: the pattern addresses and the forces to consider.
Developer forums, blogs, and online communities are Solution: Describes how the problem is solved, including
great places to discover idioms shared by experienced the classes, objects, and interactions involved. Structure:
A diagram (often a class diagram) showing the static guidelines, tips, and code examples to help implement
relationships between components. Participants: Lists the pattern. Applicability: Lists scenarios where the
the classes and objects involved and their roles. Example: pattern can be applied effectively. Related Patterns:
In the Observer pattern, the participants are the Subject Mentions other design patterns that are similar,
and the Observers. Collaborations: Describes how complementary, or can be used in conjunction. These
participants interact and communicate to fulfill their elements ensure design patterns are well-understood,
roles. Example: In the Factory Method pattern, the effectively applied, and consistently communicated in
creator class delegates object creation to a subclass. software design.
Consequences: Explains the pros, cons, trade-offs, and
impacts of using the pattern on performance, Use Case Diagram for ATM System {diagram}
maintainability, and flexibility. Implementation: Provides
Draw Sequence diagram for ATM Machine (Complete view). [6]

INTERACTION MODEL

You might also like