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