CSC 340 Tutorial 5 Requirements Analysis TA Y

  • Slides: 8
Download presentation
CSC 340: Tutorial 5 Requirements Analysis TA: Y. An Date: 9: 00 -10: 00

CSC 340: Tutorial 5 Requirements Analysis TA: Y. An Date: 9: 00 -10: 00 am, Fri. Nov 7, 2003 Location: BA 1130 11/22/2020 CSC 340 1

Classes n A class describes a group of objects with: ¡ ¡ n Similar

Classes n A class describes a group of objects with: ¡ ¡ n Similar properties (attributes), Common behaviors (operations), Common relationships to other objects, And common meaning (“semantics”). For example, “employee” has a name, employee# and department; an employee is hired, and fired; an employee works in one or more projects. 11/22/2020 CSC 340 2

Finding classes from use cases Category Examples Conceptual things Campaign, employee, rule, team, project…

Finding classes from use cases Category Examples Conceptual things Campaign, employee, rule, team, project… People Mr Harmsworth (marketing Manager at Food. Co), Dilip ( an agent copywriter) Organization Jones & Co, The Creative Department Structures Team, project, campaign, assembly Physical things Truck, drill… Abstractions of people Supervisor, client… Abstractions of physical things Hand tool, retail goods… Enduring relationships between Members of other categories Sale, purshase, contract, employment… 11/22/2020 CSC 340 3

Identifying classes n n n You don’t model objects which are beyond the scope

Identifying classes n n n You don’t model objects which are beyond the scope of the system. It is not usually necessary for a model to contain classes that represent the entire system. You should remove class which is really a synonym of others. Avoid too vague names which you cannot write description. Avoid too specific names which are really a generalization. Don’t tie up with physical inputs and outputs. 11/22/2020 CSC 340 4

Classes and attributes n n “A member of staff has one grade at a

Classes and attributes n n “A member of staff has one grade at a time, but members may have several previous grades, and several members may have a same grade. ” “A grade has only one rate at a time, and each rate has a money value. Grade may have a rate attribute. ” 11/22/2020 CSC 340 5

Classes and attributes n n “A grade may have several previous rates, which suggests

Classes and attributes n n “A grade may have several previous rates, which suggests either that Grade has multiple rate attributes, or that Rate and Grade are distinct classes. ” “Rate must have a date attribute. ” 11/22/2020 CSC 340 6

UML class diagram Where to put the attributes grade. Start. Date And grade. Finish.

UML class diagram Where to put the attributes grade. Start. Date And grade. Finish. Date? 11/22/2020 CSC 340 7

Association class 11/22/2020 CSC 340 8

Association class 11/22/2020 CSC 340 8