views:

308

answers:

1

The use case to model is the register of a new appointment.

The user logins in the system as a patient (role). To make an appointment shoudl enter medical specialty and date. System shoudl look for the doctors availables for that specialty on that date. From the results patient should choose one and then system save the appointment. At the end user shoudl receive an email with the information of the appointment.

The classes that I have in my model are: User PAtient Doctor Appointment DoctorShcedule and some more but I think these ones will be involve.

I have this initial sequnce diagram:

diagram

I have problem to set the return messages and also with the email step.

Thanks

A: 
I have problem to set the return messages and also with the email step.

There two notations for return messages either by sending a return message as you did in response to checkAvailability() or by writing the returned value or object behind the called method i.g. checkAvailability() : bool .

Sending a mail is an asynchonous operation and the mail leaves your system. I would suggest to introduce another class Mailer which should process the sendMail() message instead of your class user. Receiving the mail later is another use case and receiption of this mail doesn't belong into this sequence diagramm (IMHO).

stacker
ok its clear for me that receivng email is not part of this diagram.Is it necesary to create another class for Mailer, and include it in the class diagram as part of the model?
Milena
@Pamela I would do this to have an receiver of the sendMail() method
stacker