Skip to main content

Collaboration and use case diagram case

Short answer

Actors: User and Administrator. User views population data, with optional visualisation and forecasts. Admin performs data entry, modification, and monthly updates after login. Collaboration: User selection triggers DataController to query Database and render results; Admin logs in via AuthController.

Read the following case study carefully and answer the given questions. Ministry of Health and Population is willing to computerize its system. This new system will be able to tell the population of the country, zone and district and even of the ward of specific place. The system will update its data in monthly basis so that the birth rate and death rate can be easily seen. The home page is displayed when a person enters to the system. Administrators can enter to the admin panel by logging in with an ID and a password. He/she has privileges to enter and modify the data into the database. On the other hand, normal users can view the data but not modify them. They can also visualize the data in graphical form with animated charts, maps as well as in tabular form based on their selection of data. Besides, they can also view the forecasted data. (Make your assumptions if necessary) Draw collaboration diagram and use case diagram.

Assumptions: the system is the "Population Information System" (PIS). Actors are the Administrator and the User (normal visitor). Data is updated monthly by the administrator. A Database object holds the data.

Use case diagram

              +------------------------------+
              |  Population Information Sys. |
  [User] -----|-( View Home Page )           |
  [User] -----|-( View Population Data )     |
              |        ^ <<extend>>          |
  [User] -----|-( Visualize Data )           |
  [User] -----|-( View Forecast Data )       |
              |                              |
 [Admin] -----|-( Enter Data )--+            |
 [Admin] -----|-( Modify Data )-+ <<include>>|
              |                 v            |
              |             ( Login )        |
 [Admin] -----|-( Update Monthly Data )      |
              +------------------------------+

Actors and their use cases:

ActorUse cases
UserView Home Page, View Population Data (by country, zone, district, ward), Visualize Data (chart, map, table), View Forecast Data
AdministratorLogin, Enter Data, Modify Data, Update Monthly Data (birth and death rate)

Relationships: Enter Data, Modify Data and Update Monthly Data include Login; Visualize Data extends View Population Data (optional graphical form); View Forecast Data is a separate use case.

Collaboration (communication) diagram

Scenario: the user views the population of a district in graphical form. Objects: :User (actor), :HomePage, :DataController, :Database, :ChartView. Numbers show message order.

        1: selectDistrict()
 :User ------------------> :HomePage
                               | 2: getPopulation(district)
                               v
                         :DataController
                          |            |
          3: query(district)|            | 5: render(data)
                          v            v
                      :Database      :ChartView
                          |  4: data      ^
                          +-- (returned) -+
                            6: show chart to :User

Message list:

  1. selectDistrict() from User to HomePage
  2. getPopulation(district) HomePage to DataController
  3. query(district) DataController to Database
  4. data returned to DataController
  5. render(data) DataController to ChartView
  6. showChart() to User

Admin scenario: 1: login(id,pw) -> :AuthController, 1.1: verify() -> :Database; 2: enterData() -> :DataController; 2.1: save() -> :Database.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Object Oriented Analysis and Design chapter 2 questions →