Problem Statement
When system requirements are unclear or stakeholders have different views, teams struggle to agree on what the system should do. This leads to missed features, wasted effort, and confusion during development.
This diagram shows actors (users or external systems) connected to use cases (system functions) they interact with.
### Before: No clear structure for user interactions class System: def process(self, user_type, action): if user_type == 'admin' and action == 'delete': print('Admin deletes data') elif user_type == 'guest' and action == 'view': print('Guest views data') else: print('Action not allowed') ### After: Using classes to represent actors and use cases clearly class Actor: def __init__(self, name): self.name = name class UseCase: def __init__(self, name): self.name = name def execute(self, actor): print(f'{actor.name} executes {self.name}') admin = Actor('Admin') guest = Actor('Guest') view_data = UseCase('View Data') delete_data = UseCase('Delete Data') view_data.execute(guest) # Guest executes View Data delete_data.execute(admin) # Admin executes Delete Data
use case diagram in system design?actor in a use case diagram?Customer and Admin, and use cases Place Order, Cancel Order, and Update Inventory. Which use case should only be connected to the Admin actor?Update Inventory as it is a system management task.Update Inventory -> Option D<<extend>> = optional behavior [OK]Member actor that includes an Admin actor managing the system?Pass the test and this pattern moves unknown