时序图示例
建模的用例是新约会的登记。
用户以患者(角色)身份登录系统。预约时应输入医学专业和日期。 系统应该寻找在该日期可以从事该专业的医生。 患者应从结果中选择一项,然后系统保存预约。 最终用户应该收到一封包含预约信息的电子邮件。
我的模型中的类是: 用户 病人 医生 预约 医生时间表 还有更多,但我认为这些都会涉及到。
我有这个初始序列图:
我在设置返回消息以及电子邮件步骤时遇到问题。
谢谢
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:
I have problem to set the return messages and also with the email step.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
返回消息有两种表示法,要么像响应
checkAvailability()
那样发送返回消息,要么在被调用方法后面写入返回值或对象checkAvailability() : bool< /代码> .
发送邮件是一个异步操作,邮件会离开您的系统。我建议引入另一个类 Mailer,它应该处理 sendMail() 消息而不是您的类用户。稍后接收邮件是另一个用例,并且该邮件的接收不属于该序列图(恕我直言)。
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).