flowchart LR
A[Analysis] --> B[Design] --> C[Implementation \n Java]
BCS1430
Dr. Ashish Sai
đ Week 2 Lecture 1 & 2
đť BCS1430.ashish.nl
đ EPD150 MSM Conference Hall
Understanding what needs to be designed
Analyze the system

Model the system
Design the software
âď¸
Design is a conceptual solution that meets the requirements â how can we solve the problem
Object-Oriented Design (OOD):
flowchart LR
A[Analysis] --> B[Design] --> C[Implementation \n Java]
Modularity: Degree to which a system or computer program is composed of discrete components such that a change to one component has minimal impact on other components. ( ISO/IEC 2011)
UM & 2FA
Reusability: Objects and classes created for one project can be used in another, reducing development time and increasing productivity.
Degree to which an asset can be used in more than one system, or in building other assets. (ISO 25010)
Payment processing for different services (e-commerce, in-app purchases)
OOA is the investigative phase where you dive deep into the problem domain.
Ask the right questions and identify the objects and interactions.
Goal: Create a model of the real world that can be translated into a software system.
Itâs easier to change a design than to change a built system.
Turn the conceptual model (from OOA) into a blueprint for building the system.
Think about the system architecture, the choice of system components etc.
ISO 25010 1 defines software quality with a comprehensive set of attributes:
Completeness, Correctness & Appropriateness
đĄď¸ď¸
Maturity, Fault Tolerance and Recoverability
Understandability, Learnability and Operability
âĄď¸ď¸
Time Behavior, Resource Utilization and Capacity
đď¸ď¸
Modularity, Reusability and Analyzability
Requirements are descriptions of the systemâs features, and constraints.
Essential for guiding development and testing.
Help in setting customer expectations.
Basis for project planning and design decisions.
Software Requirements:
Functional Requirements
Non-functional Requirements
Domain Requirements
Functional Requirements describe:
The services the system must provide.
How the system should react to particular inputs.
How it should behave in certain situations.
Functional Requirements Characteristics:
Clearly state what the system should do.
Include calculations, technical details, data manipulation and processing, and other specific functionality.
Example:
âThe system shall allow users to enter their credentials to log in.â
âUpon receiving a userâs input, the system shall calculate and display the results within 2 seconds.â
Non-functional requirements set criteria to judge the operation of a system, rather than specific behaviors, including constraints on the system and standards.
Performance: Speed, responsiveness, consumption.
Reliability: Frequency of failure, recoverability.
Usability: Understandability, learnability, operability.
Security: Access control, integrity, confidentiality.
Example:
âThe system should load the homepage in under 3 seconds when accessed from a standard broadband connection.â
âUser data should be encrypted using industry-standard encryption algorithms.â
Domain requirements reflect domain-specific knowledge, standards, or regulations that the software must comply with.
Key Aspects:
Reflect application domain behavior.
Influence system functionality and performance.
Include legal and regulatory requirements.
Example:
âThe software must store medical data in compliance with healthcare regulations.â
âThe system must perform currency conversion according to international financial standards.â
Requirements gathering is the process of collecting the needs and specifications from stakeholders to design a system that meets their expectations.
Understand stakeholder needs, and translate those into technical specifications.
Stakeholders are:
Example:
A use case is a detailed description of how users perform tasks, outlining a systemâs behavior from a userâs perspective.
Description: This use case describes how a customer can enter a new order into the system.
Actors:
Customer
System
Market
Preconditions: Customer is logged on to the website.
Postconditions:
The trade has been processed.
The Customer has received the confirmation from the system.
| Step ID | Actor | Action | Notes and References |
|---|---|---|---|
| BF-1 | Customer | Customer navigates to the order entry page. | |
| BF-2 | System | System displays the order entry page. | |
| BF-3 | Customer | Customer enters the following order details: Buy/Sell, Quantity, Stock Symbol | |
| BF-4 | Customer | Customer submits the order. | |
| BF-5 | System | System validates the information entered by the customer. | AF-1: Customer enters invalid information |
| BF-6 | System | System submits the order to the marketplace. | |
| BF-7 | Market | Market executes the order. | |
| BF-8 | Market | Market sends the execution report to the system. | |
| BF-9 | System | System displays the execution report to the customer. |
AF-1: Customer enters invalid information
| Step ID | Actor | Action | Notes and References |
|---|---|---|---|
| AF-1-1 | System | If the customer has entered invalid information the system will display an error message: âYou have entered invalid information.â | |
| AF-1-2 | Customer | Customer corrects the information and resubmits. | |
| AF-1-3 | [Go to BF-5] |
EF-1: System is down or unavailable
| Step ID | Actor | Action | Notes and References |
|---|---|---|---|
| EF-1-1 | System | If the system is down/unavailable the system will display a message to the customer: âThe system is currently unavailable.â | |
| EF-1-2 | [Use case ends] |
EF-2: System cannot connect to the market
| Step ID | Actor | Action | Notes and References |
|---|---|---|---|
| EF-1-1 | System | If the system cannot connect to the market the system will display a message to the customer: âThe system cannot connect to the market. Please try again later.â | |
| EF-1-2 | [Use case ends] |
| ID | Name | Description |
|---|---|---|
| SR-1 | Tabbing | The system will enable the user to tab from field to field on the order entry page. |
User-Centric Design: Focus on user actions and system responses.
Detailing Flows: Clear definition of basic, alternate, and exception flows.
Supplemental Requirements: Address additional user experience enhancements.
Adaptability: The use caseâs structure allows for easy updates and modifications.
Starbucks introduced Mobile Order & Pay to allows customers to place orders and pay in advance to reduce waiting times.
Objectives:
Improve customer satisfaction by reducing in-store waiting times.
Increase operational efficiency and order accuracy.
Enhance the customerâs personalization and convenience.
Actor: Customer
Preconditions:
The customer has the Starbucks mobile app installed.
The customer has an account with payment information.
Basic Flow:
The customer opens the app and selects the âOrderâ option.
The customer browses the menu and selects items to order.
The customer reviews the order and makes any modifications.
The customer confirms the order and selects a pickup location.
The customer pays for the order through the app.
The system sends the order to the selected store.
The customer receives a notification when the order is ready for pickup.
Postconditions:
Functional Requirements:
FR1: The app must allow users to browse the menu and select items.
FR2: The app must provide an option for order modification before confirmation.
FR3: The app must securely process payment information.
FR4: The system must send the order to the selected store and confirm readiness through a notification.
Non-Functional Requirements:
NFR1: The app should load the menu within 2 seconds (Performance).
NFR2: The payment system must comply with PCI DSS standards (Security).
NFR3: The app should be accessible and user-friendly (Usability).
NFR4: The system should handle 1000 orders simultaneously without performance degradation (Scalability).
Not all requirements are of equal importance.
Evaluate the urgency, value, and feasibility of each requirement. (Prioritization)
Technique(s): MoSCoW (Must have, Should have, Could have, Wonât have this time)
MoSCoW technique is a prioritization tool used to reach a common understanding on the importance of various requirements.
Components:
Must have (M): Essential features, required for successful and functional project.
Should have (S): Important but not vital features.
Could have (C): Desirable features that are beneficial but not crucial.
Wonât have this time (W): Features that, may be useful, are not a priority for this iteration.
Functional Requirements:
FR1: The app must allow users to browse the menu and select items.
FR2: The app must provide an option for order modification before confirmation.
FR3: The app must securely process payment information.
FR4: The system must send the order to the selected store and confirm readiness through a notification.
Non-Functional Requirements:
NFR1: The app should load the menu within 2 seconds (Performance).
NFR2: The payment system must comply with PCI DSS standards (Security).
NFR3: The app should be accessible and user-friendly (Usability).
NFR4: The system should handle 1000 orders simultaneously without performance degradation (Scalability).
Must have (M):
FR1: Browse menu and select items - critical for basic functionality.
FR3: Securely process payment - essential for trust and legal compliance.
Should have (S):
Could have (C):
Wonât have this time (W): - Advanced custom ordering options that require new technology.
Must have (M):
NFR2: Compliance with PCI DSS for payment security - non-negotiable.
NFR3: Basic app usability - essential for user adoption.
Should have (S):
Could have (C):
Wonât have this time (W):
What is OOA?
Methodical approach to understanding a system by viewing it through the lens of the âobjectsâ (real-world entities) it involves.
Key Aspects:
- Understanding the Domain: Examining the problem or system from an object-centric perspective.
- Capturing Requirements: Identifying what the system must do from the viewpoint of the objects.
- Defining the System: Creating a model that effectively addresses and fulfills the identified needs.
Core Concepts:
- Objects: Instances from the problem domain represented in the system.
- Classes: Blueprints defining attributes and behaviors of objects.
Process:
Examine the Domain: Analyze the real-world scenario to model.
Spot Key Entities: Identify significant entities that play vital roles.
Define Nature and Functionality: Determine attributes and operations for each entity.
Example: - Library System: Key objects like books, members, and loans with specific attributes and behaviors.
Objects do not exist in isolation!
Types of Relationships:
Associations: Simple connections between objects.
Aggregations: Whole-part relationships indicating a collective.
Compositions: Strong whole-part relationships with dependency.
Example: - E-commerce Platform: âCustomerâ places an âOrderâ containing âProductsâ.
Definition:
Represents a âuse-aâ or âhas-aâ relationship where one object uses or interacts with another.
class Customer {
private Order order;
void placeOrder() { /*...*/ }
}
class Order {
// Order related methods
}Here, a Customer has an association with Order as it places an order. This is a one-to-one relationship.
Definition:
A specialized form of association representing a âwhole-partâ relationship, with objects having their own life cycle but forming a whole.
Denotes a âhas-aâ relationship.
The part can exist independently of the whole.
A Team consists of multiple Players. Players can exist without a team, illustrating the whole-part relationship.
Definition:
Composition is a strong form of aggregation implying ownership. When the whole is destroyed, so are the parts.
Represents a strong âcontains-aâ relationship.
The life cycle of the part is tied to the whole.
class Engine {
// Engine specific methods
}
class Car {
private Engine engine = new Engine();
void start() { /* Starts the engine */ }
}A Car has a Engine as part of its composition. If the car ceases to exist, so does the engine, indicating a strong dependency.
Object Interaction Analysis is a technique used to understand how objects in the system will communicate and collaborate.
Interaction diagrams are used to visualize these interactions 1.
Class-Responsibility-Collaborator (CRC) Cards:
CRC cards is a simple tool used to define the behaviors and interactions of classes.
Components of a CRC Card:
Class Name: The entity or concept being modeled.
Responsibilities: What the class should know or do (its behavior).
Collaborators: Other classes this class interacts with or uses.
Class Name: ShoppingCart
Responsibilities:
Add Item: Include a new product in the cart.
Calculate Total: Compute the total cost of items in the cart.
Remove Item: Take out a product from the cart.
Checkout: Initiate the purchasing process.
Collaborators:
Product: Items that can be added to the shopping cart.
User: The customer who owns the shopping cart.
class ShoppingCart {
private List<Product> products;
private User owner;
void addItem(Product product) { /*...*/ }
double calculateTotal() { /*...*/ }
void removeItem(Product product) { /*...*/ }
void checkout() { /*...*/ }
}
class Product { /* Product details */ }
class User { /* User details */ }The ShoppingCart class has clear responsibilities like managing items and calculating totals, and it collaborates with Product and User classes to fulfill these responsibilities.