I'm working on an usecase diagram before build an application (using ruby on rails).
Association Model (plan) :
- student has_one user
- teacher has_one user
- user belongs_to student
- user belongs_to teacher
- user has_many topic
- user has_many comment
- topic belongs_to user
- comment belongs_to user
Attribute Per Model (plan) :
I'm using two devise model : one devise for student authentication and other devise for teacher authentication.
- student : id, username, password, name, nis
- teacher : id, email, password, name, nip
- user : id, student_id, teacher_id (for logic : if student has_one user, teacher_id is empty and if teacher has_one user, student_id is empty)
Here's scenario for usecase :
- A student as a
usermakea topicanda commentrequiredlogin student- A teacher as a
usermakea topicanda commentto topic requiredlogin teacher
Note the 'and'; all users seems to do both. If you separate
Post Topic and Leave Comment, your use case diagram needs to make
it clear the user interaction involves both.
I am not sure why there is no "to topic" in the first line. Why is
that difference important?
I've made a usecase, but I'm not sure this is true for my plan.
I know All users (student and teacher) can create a topic and add comments but teacher and student are different model.
Question : Should I make include
post topicandleave commenttologin studentandlogin teacher? If that's wrong, how to correct of use case for my project plan?
-- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer Imagine how much more difficult physics would be if electrons had feelings -- Richard Feynman Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared. H. S. Lahman H.la...@verizon.net website: http://www.hslahman.com/ software blog: http://pathfinderpeople.blogs.com/hslahman/index.html software book: Model Based Development, Addison-Wesley, 2011 geology book: The Evolution and Utilization of Marine Resources, MIT Press, 1972
Yes, I can make the same, if teachers and students are both user and I can make a usecase like this
But Lets say between teacher and student is different ( because I get a project that required like it T_T ) and I have to create more usecases with condition : student and teacher are different. If my project plan and case like it, what do I have to do to create a usecase ?
I tried to make usecase again, and verify it with software. Is this true? See, I passed the verification of rules uml :
I mean like this :
- A student as a
usermakea commentbefore createa topicrequiredlogin student- A teacher as a
usermakea commentbefore createa topicrequiredlogin teacherAs in this forum : I make a topic, me and you comment my topic :D