3.3. Apply and Explain GRASP Patterns - Satyum97/Course-Management-System GitHub Wiki

1) Sequence diagram for UC1. Sign up for the system. Here, there are three actors Admin/Student/Instructor that have the rights to do so.

sd1

GRASP Principles used:

  1. Creator: DB Mng uses Creator pattern as it creates a new user object
  2. Controller: Controller uses Controller pattern as it assigns responsibility to DB Mng to create a new user
  3. Indirection: Controller uses indirection design pattern as it assigns an intermediate object(DB Mng) to create a user object
  4. Expert: Controller uses expert design pattern as it assign responsibility of creating user object to DB Mng as the information regarding user object is stored in DB
  5. Pure Fabrication: Controller uses Pure Fabrication design pattern to achieve high cohesion and low coupling.

2) Sequence Diagram for UC2. Login to the system. Here, there are three actors Admin/Student/Instructor that has the rights to do so.

pr2uc2 (1)

GRASP Principles used:

  1. Controller: Controller uses Controller pattern as it assigns responsibility to DB Mng to find a user
  2. Indirection: Controller uses indirection design pattern as it assigns an intermediate object(DB Mng) to find a user object, it also helps to achieve low coupling and high cohesion.
  3. Expert: Controller uses expert design pattern as it assign responsibility of finding user object to DB Mng as the information regarding user object is stored in DB

3) Sequence diagram for UC3. Students search for courses. Here, there is only one actor Student that has the rights to do so.

pr2uc3 (1)

GRASP Principles used:

  1. Controller: Controller uses Controller pattern as it assigns responsibility to DB Mng to find courses
  2. Indirection: Controller uses indirection design pattern as it assigns an intermediate object(DB Mng) to find courses, it also helps to achieve low coupling and high cohesion.
  3. Expert: Controller uses expert design pattern as it assign responsibility of finding courses to DB Mng as the information regarding courses is stored in DB

4) Sequence diagram for UC4. Admin add/edits/deletes course info. Here, there is only one actor Admin that has the rights to do so.

sd4

GRASP Principles used:

  1. Creator: DB Mng uses Creator pattern as it creates a new program object
  2. Controller: Controller uses Controller pattern as it assigns responsibility to DB Mng to create a new program
  3. Indirection: Controller uses indirection design pattern as it assigns an intermediate object(DB Mng) to create a program object
  4. Expert: Controller uses expert design pattern as it assign responsibility of creating object to DB Mng as the information regarding user object is stored in DB_
  5. Pure Fabrication: Controller uses Pure Fabrication design pattern to achieve high cohesion and low coupling.

3.4. Implementation