I am having trouble gaining an intuition about UML Use Case Diagrams and what to include in them and what not, starting from a given scenario in prose.
I have read through my course materials and the according chapters in "Software Engineering (Sommerville)" and "Use Case Modelling (Bittner)".
However, I still struggle modelling this particular scenario:
The electronic payment mechanism of a petrol station is to be completely automated. The customer puts his credit card into a card reader. The credit card is examined by communication with the bank and a maximum quantity that the customer is permitted to pump is returned from the bank. If the credit card is invalid, refuelling is refused and the credit card is returned. Otherwise, the customer is permitted to remove the hose from the mounting plate and to start refueling. The refueling is terminated either when the maximal permissible amount of petrol is dispensed, or when the customer decides to put the hose back into the mounting plate. The amount owed for the petrol dispensed is charged to the customer’s credit card account when the refueling process has finished. After completion of the transaction the credit card is returned.
After doing some reading, I came up with the following diagram:
unboxed texts in gray show my reasoning.
- Is this correct? Am I missing something?
- Is the association from Pay to Customer reasonable?
- I am particularly unsure if there should not also be Use Cases like Remove Hose and Put Back Hose. Some say, Use Cases should show the steps that the user has to do in order to achieve his goal. Others say, that each use case should provide a meaningful profit to the user. Are refuel and pay really the only two sensible use cases here?