Search code examples
actoruse-case

Who will be the actors in this scenario for the use-case diagram?


  • Will the actors in both these cases be student and system? (These two cases as a whole point to one system)

    1. Enrol a student at the university: A student provides his or her personal details (name, address, date of birth), along with the code of the course (e.g. Bachelor of Computer Science) in which he or she wishes to enrol. A student record is created, and a unique student ID number is assigned to the student. The system automatically enrols the student in any core first-year subjects for the course.

    2. Enrol a student in a subject: A student provides his or her student ID number and the subject code of the subject in which he or she wish to enrol. The system checks that the subject requested by the student is allowed for the course in which the student is enrolled. If not, the enrolment request is rejected. The system checks what subjects (if any) are specified as prerequisites for the subject in which the student wishes to enrol. If the student has passed all the prerequisite subjects, he or she is enrolled in the desired subject. Otherwise, the enrolment request is rejected.


Solution

  • The actor of the use case will be the user. The student (or possibly a university employee). You may have a generic user and from that extend different user types.

    In this case the system could be the actual program the user is interfacing with. So the use case represents how the system user interacts with the system. A bit like the following diagram, although my diagram has no detail within the system boundary.

    enter image description here

    In some use cases, you may be examining a part of a system and then there may be a system actor from outside of the relevant case that interacts with it.

    In this case your system could be an actor, depending on how the system (or program) is modularised. The same goes for accessing databases.

    This second image is a closer look at the use case above, "run". It's looking at a module within the system.

    enter image description here

    You can see by my images, that it depends on how the system boundary is defined. UML diagrams vary greatly, and much of it depends upon the level of expected detail. If it is a school assignment, a work spec, for a quote, an idea or a simple expression of thought.

    I hope this is helpful.