All participants in a sequence diagram must match a class in class diagram?
All class that represents some object that is created by the system needs a class that creates it?
I'm modelling a system (exercises) for automatic ticketing for bus transport that have these "requisites":
- (registration) Everyone want to use the automatic ticketing service must register to it, providing general information (name, surname, etc.) and a telephone number on which the cost of tickets will be charged.
- (generate ticket) When an user wants a ticket, send a message at the service via SMS, and the system has the task to generate an e-ticket, that contains general information about ticket, like date and time of emission and a code that should be shown to the ticket inspector.
- (control validity) The system must allow a ticket inspector to control the validity of an e-ticket by the code and compare the data of the user to whom it is associated with a document provided by the user.
Now for this domain, I make this simplified class diagram:
Now I need to represent a sequence diagram for a use case buyTicket in which the actor is the user. In this sequence diagram I need to represent a "system" participant with which the user communicates, but it isn't in the class diagram.
So I need to make a class that acts like a service between user and the creation of e-ticketing or I can use participant in sequence diagram that aren't in the class?
Thank's in advance!