Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan, 2008-2014.

Similar presentations


Presentation on theme: "1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan, 2008-2014."— Presentation transcript:

1 1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan, 2008-2014

2 2 Class Exercise  You will have 2-3 minutes to discuss with your team what classes you will need in the class diagram  After your discussions, I will choose one requirement or one group of requirements  You will have another 1-2 minutes to decide how to add that requirement to the class diagram  I will then choose a team randomly and ask one of the team members to come and add that requirement to the class diagram  I will repeat this until all requirements have been added  After each requirement is added we will discuss what has been added, and other ways of adding the same requirement (if any)

3 Janice Regan, 2008-2014 3 Class exercise  Consider a University (we will be building a registration system)  Instructors are part of one or more departments  A course offering is a course offered in a particular term  Each course offering is taught by one instructor  2 offerings of the same course can have different instructors  Instructors teach course offerings (<=4 per term)  Students take course offerings (<=8 per term)  Students can be full time students or part time students  Faculties consist of departments  Departments offer course offerings  Students are part of one department  We want to build a class diagram for this university

4 Janice Regan, 2008-2014 4 Lets Start  Begin by considering the first requirement  Instructors are part of 1 or more departments Instructor objects (remember these are not instructor actors) do not vanish if the department is closed. It is possible for an instructor object to be associated with (to be a part of) more than one department object  To model this requirement we need two classes Instructor department

5 Janice Regan, 2008-2014 5 Classes An instructor object can be part of more than one department object!  A course offering is a course offered in a particular term  Need more classes, to model this requirements  course and course offering Department Instructor Composition OR aggregation 1..* 0..* Multiplicity?

6 Janice Regan, 2008-2014 6 Classes If a course object is destroyed all course offerings objects are destroyed. A course offering object can belong to only one course Department Course offering Instructor course Composition OR aggregation Multiplicity? 1..* 0..* 1..* 1

7 Janice Regan, 2008-2014 7 Classes Department Course offering Instructor course 1..* 0..* 1..* 1 Instructors teach course offerings (<=4 per term)  Instructor objects (remember these are not instructor actors) do not vanish if a course object is deleted.  It is possible for an instructor object to be a part of more than one course  Course offerings are taught by one instructor  Different instructors can teach different offerings of a particular course

8 Multiplicity and time  How do you determine multiplicity  In a given term an instructor teaches from 0 to 4 courses  If the diagram is for one term the multiplicity is 0..4  If we are considering many terms should the multiplicity be 0..* because the instructor teaches many courses?  No, consider the multiplicity at any given instant in time (at any given time the instructor teaches from 0…4 courses) Janice Regan, 2008-2014 8

9 9 Classes  Course offerings are given to between 5 and 100 students  Students take course offerings (<=8 per term) Department Course offering Instructor teach 1 0..4 course 1..* 0..* 1..* 1 Application specific relationship? Multiplicity? Additional relationships?

10 Janice Regan, 2008-2014 10 Classes  Part time students and Full time students are both types of students Student takes 5..100 Department Course offering Instructor teach 1 0..4 course 1..* 0..* 1..* 1 0..8 Application specific relationship? Multiplicity? Additional relationships?

11 Janice Regan, 2008-2014 11 Classes  The Faculty is composed of departments. If the Faculty ceases to exist the departments cease to exist. A department can belong to only one faculty Student PT Student FT Student takes 5..100 Department Course offering Instructor teach 1 0..4 course 1..* 0..* 1..* 1 0..8

12 Janice Regan, 2008-2014 12 Classes  Students belong to one Faculty Student PT Student FT Student takes 5..100 Department Course offering Instructor teach 1 0..4 course 1..* 0..* 1..* 1 0..8 Faculty

13 Janice Regan, 2008-2014 13 Classes Student PT Student FT Student takes 5..100 Department Course offering Instructor teach 1 0..4 course 1..* 0..* 1..* 1 0..8 Faculty

14 Generalization and aggregation  System Admin account is a specific type of account  Instructor account is a specific type of account  A system admin account includes a list of account objects in the system (may be some or all, used for choosing account to manage) Janice Regan, 2008-2014 14 ACCOUNT SYSTEM ADMIN ACCOUNT Instructor ACCOUNT 0..*

15 Objects vs  System Admin account is a specific type of account  Instructor account is a specific type of account  A system admin account includes a list of account IDs and names that the system admin can use to choose an account (not account objects) Janice Regan, 2008-2014 15 ACCOUNT SYSTEM ADMIN ACCOUNT Instructor ACCOUNT

16 One way relation  The system admin (object) creates a new account object or modifies an existing account object  The system admin account object has the account object in its list or adds it to its list (knows about it)  The account object does not know or care which system admin account created or modified it  The account object will not do anything to the system admin account object Janice Regan, 2008-2014 16 ACCOUNT SYSTEM ADMIN ACCOUNT Instructor ACCOUNT 0..* < Creates/modifies 1 0..*


Download ppt "1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan, 2008-2014."

Similar presentations


Ads by Google