OOAD assignment solution
OOAD assignment solution
Q-2 “Use case diagram builds the bridge between user and system”, Justify
the statement. (5 Marks)
1. User-Centric Representation:
o A use case diagram visually represents the functionalities of a system from a
user's perspective.
2. Identifying System Boundaries:
o It defines the scope of the system by identifying external actors (users,
systems) and their interactions.
3. Requirement Validation and Communication:
o Use case diagrams help communicate requirements effectively between
stakeholders, developers, and testers.
o This minimizes misunderstandings and aligns the system with user needs.
4. Facilitates Development and Testing:
o Developers use use cases to design the system’s structure.
o Testers create test cases based on use cases to validate system behavior.
5. Enhances System Design:
o Since use case diagrams are high-level representations, they guide detailed
system design and user experience.
Q-4 Draw a use case diagram depicting the relationship among use cases. (4
Marks)
Q-5 Develop the use cases within the unified process for NextGen POS. (4
Marks)
Process Sale
Handle Payments
Manage Inventory
Generate Sales Reports
Authorize Employee Login
Actors:
o Primary: Cashier, Customer, Manager
o Secondary: Bank System (for payment authorization)
Use Case: Process Sale
o Actors: Cashier, Customer
o Preconditions: System is operational, cashier is logged in.
o Flow:
1. Cashier scans items.
2. System displays prices and total amount.
3. Customer chooses payment method.
4. Payment is processed.
5. Receipt is printed.
Developers write code for scanning items, storing transactions, and handling
payments.
Database tables are designed for storing sales records.
Assignment 2
1. Code Reusability
2. Extensibility
3. Polymorphism Support
(C) State whether the statement "The image above represents a Hybrid Inheritance" is
true or false.
(D) State whether the statement "The Protected Interface is accessible only to the class
itself and its subclasses" is true or false.
Assignment 3
Concept:
Example:
1. After payment, the system can process the order and send a confirmation email in
parallel (Fork).
2. Once both tasks are completed, they synchronize before proceeding to dispatch the
item (Join).
Definition:
Example:
Definition:
A Deployment Diagram represents the physical hardware and software nodes in a system.
Example:
Definition:
A State Machine Diagram describes the different states of an object and the transitions
between them.
Components:
Example:
2. Class Diagram
Main Classes:
o Customer (name, email, address)
o Order (orderID, items, status)
o Restaurant (name, menu)
o Payment (amount, method)
o Delivery Agent (agentID, status)
Relationships:
o Customer places Order → Order processed by Restaurant → Order assigned
to Delivery Agent.
3. Sequence Diagram
4. Activity Diagram
Customer: Browse → Add to Cart → Place Order → Make Payment → Track Order.
Restaurant: Receive Order → Prepare Food → Handover to Agent.
Delivery Agent: Pick Order → Deliver → Mark as Delivered.
Fork & Join: Payment confirmation triggers parallel processes (restaurant &
delivery).
5. Component Diagram
Modules:
o User Interface (Mobile/Web)
o Order System (Backend)
o Payment Gateway API
o Restaurant Management System
o Delivery System
Assignment 4
1. Creator – Assigns responsibility for creating an object to a class that has information
about it.
2. Information Expert – Assigns responsibility based on where relevant data is stored.
3. Controller – Manages system operations, delegating tasks to other objects.
4. Low Coupling – Reduces dependencies between objects to improve maintainability.
5. High Cohesion – Ensures a class has well-defined, focused responsibilities.
6. Polymorphism – Allows different classes to be used interchangeably via common
interfaces.
7. Pure Fabrication – Creates helper classes to handle responsibilities without adding
unnecessary burden to domain objects.
8. Indirection – Introduces an intermediate object to decouple classes.
9. Protected Variations – Shields the system from changes by using stable interfaces.
Testing Strategies: