Anda di halaman 1dari 26

Analyse et Méthodologie

Informatiques

Case: Courseware System

Roel Wuyts
ULB
2005/2006

http://decomp.ulb.ac.be/education/ami0506/
Sequential approach: case study
We’ll take a problem statement and
✦ define use cases
✦ design the system
‣ build class diagrams
‣ complement with interaction diagrams

This would then be followed by the implementation


✦ which we will not do

Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006 2


Case : Requirements
For our case study, we will be the architects assigned the task of constructing
the design elements for a system that can be used to manage courses/classes
for an organization that specializes in providing training. Let us name the
system that we will be designing as the Courseware Management System. The
organization offers a variety of courses in a variety of areas such as learning
management techniques and understanding different software languages and
technologies. Each course is made up of a set of topics. Tutors in the
organization are assigned courses to teach according to the area that they
specialize in and their availability. The organization publishes and maintains a
calendar of the different courses and the assigned tutors every year. There is a
group of course administrators in the organization who manage the courses
including course content, assign courses to tutors, and define the course
schedule. The training organization aims to use the Courseware Management
System to get a better control and visibility to the management of courses as
also to streamline the process of generating and managing the schedule of the
different courses. Students can view and take courses.

3
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Make use cases
Remember:
✦ What are the actors?
✦ What are their relations (if any)?
✦ What are the use cases?
✦ Associate actors and use cases

4
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding actors
From the problem statement we can find the following terms
and entities specific to the system:
✦ Courses and Topics that make up a course
✦ Tutors who teach courses
✦ Course administrators who manage the assignment of the
courses to tutors
✦ Calendar or Course Schedule is generated as a result of
the course management system
✦ Students who refer to the Course schedule or Calendar
to decide which courses they wish to take up for study

5
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding actors (ctd)
What are the active parts in the previous list?
✦ Tutors
✦ Course administrators
✦ Students
Difference between tutors and students, and
administrators
✦ the course administrator is the primary actor
✦ students and tutors are secondary actors

6
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding use cases
The primary business flows in the system are:
✦ Manage courses
✦ Manage course assignments
Let’s have a look at these two in more detail

7
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Managing courses
We can find the following processes for managing
courses:
✦ View courses
✦ Manage topics for a course
✦ Manage course information

8
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Manage course assignments
Similarly, we can identify the following processes for
managing course assignments:
✦ View course calendar
✦ View tutors
✦ Manage tutor information
✦ Assign courses to tutors

9
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
So..
We found one primary actor: course administrators
And the following use cases:
✦ View courses
✦ Manage topics for a course

✦ Manage course information

✦ View course calendar

✦ View tutors

✦ Manage tutor information

✦ Assign courses to tutors

10
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Use case diagram
Courseware Management System

View courses

Manage course
information Manage topics for
a course

Student
View course
calendar

View tutors
Course
Administrator
Tutor

Manage tutor
Assig courses to information
tutors

11
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Build class diagram
We now have use cases
✦ what does the system do?
Now let’s design the system
✦ how does the system accomplishes its goal?
✦ Can use responsibility-driven design
‣ Find responsibilities from requirements, and distribute
them over classes
✦ Or can get them from use cases

12
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Identifying classes
Actors are primary entities in the system
✦ will be mapped on classes
Also have passive entities (courses, topics, calendar)
✦ also will be mapped to classes

13
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Identifying methods
CourseAdministrator is the primary actor
✦ use cases it is connected to become methods

ClassName Methods
viewCourses()
manageCourse()
manageTopic()
CourseAdministrator viewCourseCalendar()
viewTutors()
manageTutorInformation()
assignTutorToCourse()

14
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Identifying methods (ctd)
Add methods for domain knowledge
ClassName Methods
viewAllCourses()
viewCourseInformation()
Course createCourse()
modifyCourse()
removeCourse()
viewAllTopics()
viewTopicInformation()
Topic createTopic()
modifyTopic()
viewTutorInformation()
createTutor()
Tutor modifyTutor()
removeTutor()
CourseCalendar viewCourseCalendar()
viewAllStudents()
Student viewStudentInformation()
15
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Classes
CourseAdministrator

+viewCourses() Tutor
+manageCourse() Student
+viewTutorInformation()
+manageTopic()
+createTutor() +viewAllStudents()
+viewCourseCalendar()
+modifyTutor() +viewStudentInformation()
+viewTutors()
+removeTutor()
+manageTutorInformation()
+assignTutorToCourse()

Topic Course

+viewAllTopics() +viewAllCourses() CourseCalendar


+viewTopicInformation() +viewCourseInformation()
+createTopic() +createCourse() +viewCourseCalendar()
+modifyTopic() +modifyCourse()
+removeTopic() +removeCourse()

16
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding relations
Let’s highlight the actors in our original description:

The organization offers a variety of courses in a variety of areas such as


learning management techniques and understanding different software
languages and technologies. Each course is made up of a set of topics. Tutors in
the organization are assigned courses to teach according to the area that they
specialize in and their availability. The organization publishes and maintains a
calendar of the different courses and the assigned tutors every year. There is a
group of course administrators in the organization who manage the courses
including course content, assign courses to tutors, and define the course
schedule. The training organization aims to use the Courseware Management
System to get a better control and visibility to the management of courses as
also to streamline the process of generating and managing the schedule of the
different courses.

17
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding relations
Now let’s find relations between the classes:

The organization offers a variety of courses in a variety of areas such as


learning management techniques and understanding different software
languages and technologies. Each course is made up of a set of
topics. Tutors in the organization are assigned courses to teach according to
the area that they specialize in and their availability. The organization publishes
and maintains a calendar of the different courses and the assigned tutors every
year. There is a group of course administrators in the organization who manage
the courses including course content, assign courses to tutors, and define the
course schedule. The training organization aims to use the Courseware
Management System to get a better control and visibility to the management
of courses as also to streamline the process of generating and managing the
schedule of the different courses.

18
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Finding relations
“Each course is made up of a set of topics”

Topic Course

+viewAllTopics() consists of +viewAllCourses()


+viewTopicInformation() +viewCourseInformation()
+createTopic() +createCourse()
+modifyTopic() +modifyCourse()
+removeTopic() +removeCourse()

Tutors in the organization are assigned courses


✦ Can mean different things (does the tutor knows its assigned courses?)

... administrators ... who manage the courses ...

... calendar of the different courses ...

The organization publishes and maintains a calendar ... and ... tutors

...

19
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Class Diagram

CourseAdministrator

+viewCourses() Tutor
+manageCourse() Student
manages +viewTutorInformation()
+manageTopic()
+createTutor() +viewAllStudents()
+viewCourseCalendar()
+modifyTutor() +viewStudentInformation()
+viewTutors()
+removeTutor()
+manageTutorInformation()
+assignTutorToCourse()

manages teaches views


manages views

Topic Course

+viewAllTopics() consists of +viewAllCourses() consists of CourseCalendar


+viewTopicInformation() +viewCourseInformation()
+createTopic() +createCourse() +viewCourseCalendar()
+modifyTopic() +modifyCourse()
+removeTopic() +removeCourse()

20
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Adding interactions
Let’s add some interactions to complement the
(static) class diagrams
✦ sequence diagrams
✦ collaboration diagrams
These come normally from the use case descriptions
✦ which we have not looked at in this case

21
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Manage course information
The sequence of steps carried out in the "Manage course information"
flow are:
✦ A user who is a course administrator invokes the manage course
functionality.
✦ The manage course functionality of the course administrator invokes
either the course creation or course modification functionality of a
course.
✦ After the course is either created or modified, the manage topic
functionality of the course administrator calls the topic creation or
modification functionality of a topic.
✦ Finally, the user invokes the assign tutor to course functionality of
the course administrator to assign a tutor to the selected course.

22
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
With a sequence diagram

cmsUser admin: tutor: Tutor


CourseAdministrator

manageCourse()
createCourse()
course:
Course

courseID

createTopic()
topic: Topic

topicID

assignTutorToCourse()

23
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
With a collaboration diagram

course:
Course
user <<new>>

1 : manageCourse() 1..*
1.1 : courseID := createCourse()
0..*
admin: topic: Topic
CourseAdministrator 1.2: topicID := createTopic() <<new>>

1.3: assignTutorToCourse()
tutor: Tutor

24
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
Wrap-up
Sequential approach example using OO
✦ Use case analysis
✦ OO design
✦ (implementation)
Illustrates mechanism for finding classes/methods

25
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006
References
Took the example from:
http://www.developer.com/design/article.php/1593811
But adapted it because there are errors in the
solution on the website...

26
Roel Wuyts - ULB - Analyse et Méthodologie Informatiques - 2005/2006

Anda mungkin juga menyukai