Software Engneering
Software Engneering
Goals:
1. Key Stakeholders:
○ Major decision-makers
○ Project sponsors
○ Have final say on project decisions
2. End-Users:
○ Actual users of the product
○ Provide crucial feedback
○ Their needs impact project success
Capturing Requirements :The next step is capturing the requirements of the
project from the stakeholders and end-users.
● One-on-One Interviews:
● Group Interviews:
● Use Cases:
● Prototypes:
Provide a sample of the final product for feedback from end-users and
stakeholders.
Categorizing Requirements: The requirements are of various types and it
is wise to categorize them accordingly to avoid any confusion.
1. Functional Requirements:
2. Non-Functional Requirements:
1. Functional Requirements:
○ Definition: Specify what the system should do; the actions or functions it must
perform.
○ Examples:
■ Login System: The system must allow users to log in with a username and
password.
■ Data Entry: Users must be able to enter and save customer information.
2. Non-Functional Requirements:
○ Definition: Specify how the system performs its functions; related to quality
attributes and constraints.
○ Examples:
■ Performance: The system should handle 500 transactions per second.
■ Security: The system must encrypt all sensitive data to protect user privacy.
■ Usability: The system interface should be user-friendly and require no more
than 3 clicks to complete a task.
Interpreting and Recording Requirements
1. Processes:
○ Definition: Represent actions or transformations that process data.
○ Symbol: Usually depicted as circles or rounded rectangles.
○ Purpose: To show how inputs are converted into outputs.
2. Data Flows:
○ Definition: Indicate the movement of data between processes, data stores, and external entities.
○ Symbol: Arrows are used to show the direction of data flow.
○ Purpose: To illustrate how data is transferred and manipulated within the system.
3. Data Stores:
○ Definition: Represent repositories where data is stored within the system.
○ Symbol: Typically shown as open-ended rectangles or parallel lines.
○ Purpose: To depict where data is held for later retrieval and use.
4. External Entities:
○ Definition: Represent sources or destinations of data outside the system.
○ Symbol: Usually depicted as rectangles.
○ Purpose: To show interactions between the system and external actors (e.g., users, other
systems).
Levels of DFDs
1. Entities: Objects or concepts that can have data stored about them (e.g., Customer,
Product, Order).
2. Attributes: Properties or details of an entity (e.g., Customer Name, Product Price).
3. Relationships: Connections between entities that define how they interact with
each other (e.g., Customer places Order).
4. Primary Keys: Unique identifiers for entities (e.g., Customer ID, Product ID).
5. Foreign Keys: Attributes that create a link between entities (e.g., Product ID in
Order to reference Product).
2. Object-Oriented Analysis
Object-Oriented Analysis (OOA) focuses on modeling the
system based on objects, which are instances of classes that
encapsulate both data and behavior.
● Class Diagrams: Show the classes, attributes, methods,
and relationships among classes.
● Use Case Diagrams: Illustrate how users (actors) interact
with the system and the various use cases.
Online Shopping System Class Diagram
Use case Diagram
A use case is a methodology used in system analysis to identify, clarify and organize system
requirements. The use case is made up of a set of possible sequences of interactions
between systems and users in a particular environment and related to a particular goal.
● The actor. The system user -- this can be a single person or a group of people
● The goal. The final successful outcome that completes the process.
● The system. The process and steps taken to reach the end goal, including the
1. Describe customer needs: Clearly explain what the customer wants from
the system.
2. Guide software design: Provide a solid foundation to create the software's
design.
3. Ensure requirements can be tested: Define requirements in a way that
allows for testing after the software is built.
The analysis model helps connect the overall system description (which includes
software, hardware, data, and people) to the software design. It shows how the
system functions at a high level and leads to a detailed design, including the
software architecture, user interface, and components.
Analysis rules of thumb
Arlow and Neustadt suggest a number of worthwhile rules of thumb that should be
followed when creating the analysis model:
The model should focus on requirements that are visible within the problem or
business domain
Focus on key requirements: Concentrate on the main requirements of the
problem or business domain, and avoid getting stuck in details about how the
system will work.
Enhance understanding: Every part of the model should help in understanding
the system’s information, function, and behavior.
Postpone technical details: Don’t worry about infrastructure (like
databases) or technical details until the design phase.
Reduce dependencies: Avoid making too many connections between
classes and functions. If everything is too interconnected, simplify
the relationships.
Benefit all stakeholders: Ensure the model is useful for everyone
involved—business people, designers, and testers should all find
value in it.
Keep it simple: Use the simplest form of modeling. Don’t add extra
diagrams or complex symbols if they don’t add new information.
Domain Analysis
Approach Focus Key Tools
2. Common Coupling
4. Control Coupling
One module controls the behavior of another by passing control
information.
6. Data Coupling
8. No Coupling (Ideal)
2. Sequential Cohesion
● Definition: The output of one part of the module becomes the input
for another part, like a chain of operations.
● Example: A process that first checks if a user’s input is valid, and
then saves the data to the database. The two steps are connected: first
validation, then saving.
3. Communicational Cohesion
4. Procedural Cohesion
● Definition: Tasks are grouped because they happen at the same time.
● Example: During an app’s startup, it may load settings, initialize preferences, and
open the main window. These tasks are unrelated but happen simultaneously when
the app starts.
6. Logical Cohesion
● Definition: Tasks are grouped because they are logically similar, even if they aren’t
directly related.
● Example: A function that handles different types of user input, such as mouse
clicks and keyboard typing. The tasks are grouped because they deal with input, but
they aren’t directly related.
7.Coincidental Cohesion (Low Cohesion)
Encapsulation:
● A way to form new classes based on existing ones. The new class
(child) inherits attributes and behaviors from the parent class but can
also have additional features or override some behaviors.
Polymorphism:
1. Product Class: This is the base class for all products, with a Name and
Price. It has a method DisplayProductInfo() to show product details.
2. Electronics Class: This is a subclass of Product that adds a
WarrantyPeriod specific to electronics and overrides DisplayProductInfo()
to include warranty details.
3. Customer Class: Represents a customer with a ShoppingCart. The
customer can add products to their cart using the AddToCart() method.
4. ShoppingCart Class: Manages the list of products. It can add products,
calculate the total price, and display the contents of the cart.
5. Order Class: Represents a customer's completed order. The
ConfirmOrder() method finalizes the order and shows the cart contents.
Function oriented design,
1. User Interface (UI): The visible part of the system that users interact with,
like graphical interfaces, command-line prompts, or mobile interfaces.
2. Usability: The ease with which users can learn and use the system. Good
usability means the interface is simple, intuitive, and easy to navigate.
3. Consistency: The interface should behave in a predictable and uniform
manner across different parts of the system (e.g., buttons and actions should
follow the same patterns).
4. Feedback: The system should give users feedback (e.g., loading spinners,
confirmation messages) to inform them that their actions were received and
processed.
5. Error Handling: The interface should guide users when they make mistakes
and provide meaningful error messages that explain what went wrong and
how to fix it.
Steps in Interface Design:
1. Identify the Users: Understand who will use the system and their
needs (novice users, expert users, etc.).
2. Define Tasks: Identify the tasks users need to perform using the
system.
3. Design Layout: Organize visual elements on the interface for optimal
user experience (menus, buttons, forms).
4. Create Prototypes: Develop low-fidelity or high-fidelity prototypes
to test and refine the design.
5. Conduct User Testing: Evaluate the interface with real users to
identify areas for improvement.
Good Interface Design Characteristics:
1. Simple and Clear: Minimal clutter, and important features are
easy to find.
2. Responsive: The UI adapts to different screen sizes (mobile,
desktop).
3. Accessible: Ensures the interface is usable by people with
disabilities (e.g., screen readers, keyboard navigation).
4. Aesthetic: A visually appealing design that enhances user
experience.
Procedural design.
1. Identify Key Functions: Break down the system into a list of key
operations or functions that need to be performed.
2. Design Sub-Procedures: For each key function, define smaller
sub-procedures that handle specific tasks within that function.
3. Define Control Flow: Specify the order in which the procedures will
be executed, including loops, conditionals, and data flow between
procedures.
4. Develop Pseudocode: Write out the logic of each procedure in
pseudocode or flowcharts before implementation.
5. Refine and Optimize: Optimize the flow of the program to improve
efficiency, reduce redundancy, and ensure that the design is clean.
Characteristics of Procedural Design: