Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Development 2011-2014 Theory Slideshows By Mark Kelly Edited and Modified by Mr Hem Use Cases UML Use-case actors relaxing.

Similar presentations


Presentation on theme: "Software Development 2011-2014 Theory Slideshows By Mark Kelly Edited and Modified by Mr Hem Use Cases UML Use-case actors relaxing."— Presentation transcript:

1 Software Development 2011-2014 Theory Slideshows By Mark Kelly Edited and Modified by Mr Hem Use Cases UML Use-case actors relaxing

2 UML Unified Modelling Language A standard graphical language to model computer applications. Is programming-language independent, can be used with C++, Visual Basic, Java, Python: anything.

3 UML UML provides several types of diagrams to represent applications under development. – class diagram – sequence diagram – statechart diagram – component diagram – deployment diagram. – activity diagram And...

4 Use Case Diagram UCD The diagram we need to know for VCE SD. Is a picture of functional requirements in an information system. Lists the tasks that a system can do.

5 Use Case Diagram: Used during analysis phase of PSM Maps out the functional requirements of a system Describes what a system does from the standpoint of an external observer. The emphasis is on what a system does rather than how. (How is worked out during design phase of PSM)

6 UCD Serves to scope the system’s high-level functionality – Defines what functions will or will not be performed by the system – Shows developers if they have missed anything important. help development teams visualise the functional requirements of a system Used to highlight new requirements as the system is analysed and the design takes shape. E.g. “if we now want the system to do X, we’ll also need it to do A, B and C.”

7 UCD Good tool for communicating with clients due to their simplicity. Umm – simplicity of the UCD, not the client. Well, usually.

8 UCD COMPONENTS Actors Use Cases Relationships (communications) Includes, extends System boundaries

9 ACTORS A person, organisation, or external system that plays a role in the system being developed. May initiate or participate in processes. Actors are drawn as stick figures. Cos stick figures are cool. Like ninjas, but without swords.

10 ACTORS Always drawn around the edges of the UCD The same actor only appears once in a UCD Must be connected to at least one process ‘Process’ is called a Use Case.

11 Use Case Pronounced “yoose case”, not “yooze case” Drawn as an oval Name is put in or under the oval Name must start with an active verb (“make”, “open” etc)

12 Watch out! In a use case’s name don't combine sentences with commas or 'and'. This implies that interactions have been combined. Same rule applies in DFDs

13 Association Sometimes called “communication” Shown as a line. Sometimes shown as arrow (more details later) Connects an actor to a use case. Each actor may be associated with several use cases. Each use case may be associated with several actors.

14 Arrowed associations Important thing to make clear now Arrows do not indicate data flow! They are not Data Flow Diagrams (DFD) Communication is always two way between actor and use case.

15 Arrows in UCD An arrow just indicates which actor initiated the use case (the primary actor) and which actor was affected by it starting (the passive actor) With no arrow, it’s unclear which actor started a use case...

16 Example Can a patient make an appointment, or can a scheduler? Or both? Can a scheduler cancel an appointment? Hard to say.

17 Reading a UCD A patient calls the clinic to make an appointment.

18 Reading a UCD The “Make Appointment” use case contains the procedures involved in that activity The use case will define the procedures for setting up the appointment.

19 Reading a UCD The patient may request medication. The “Request medication” use case specifies how the system will handle that request for medication.

20 Reading a UCD The “Pay Bill” use case will describe procedures for bill payment

21 Reading a UCD Perhaps these procedures will be in the “Pay Bill” use case: 1.generate invoice 2.send invoice 3.cash the cheque 4.send a receipt

22 Version 2 Arrows make it clearer: -Only patients make and cancel appointments, not schedulers -Patients request medication, doctors respond - Clerks begin the bill payment use case. Patients respond.

23 Quick Quiz 1.How many actors are in this UCD? 2.How many communications (associations)? 3.How many use cases? 4.Can a doctor request that a patient be given medication? Think it out...

24 Quick Quiz 1.How many actors are in this UCD? 4 2.How many communications (associations)? 8 3.How many use cases? 4 4.Can a doctor request that a patient be given medication? Yes.

25 Actors are roles, not individuals or job titles Mr Southerby as CEO needs access to management information. Fred Smith as Order Entry Clerk needs to enter orders.

26 Sometimes Mr Southerby may need to enter an order when Fred isn't there... But DON’T draw an arrow between Mr Southerby and the Enter Order use case! Actors are roles, not individuals or job titles

27 Entering orders is not the role of the CEO. It’s the role of the clerk. So when Mr Southerby enters orders, he’s taking on the role of Order Entry Clerk. Actors are roles, not individuals or job titles

28 The system does not know or care which individual is entering orders. The system cares which agent is doing it. And when Mr S enters an order, he is at that moment the agent called the ‘order entry clerk’. Actors are roles, not individuals or job titles

29 When naming actors, think of the role that a person takes on rather than their name or job title. Most job titles involve the putting on of a number of different hats in different situations. Name the actor with the role, not a job title. Think hats! The final UCD

30 More practice 1.Which actor initiates the entering of an order? 2.Which actor responds to an order being entered? 3.Is the Accounts System actor a human? 4.Who starts off the getting of an address? 5.Can the Accounts System cancel an order? 6.During order entry, does the accounts system send information to the order entry clerk? 7.Who is the passive actor during order entry? 8.Who is the primary actor during order entry?

31 More practice Which actor initiates the entering of an order? The clerk.

32 More practice Which actor responds to an order being entered? The accounts system.

33 More practice Is the Accounts System actor a human? No, it’s an information system.

34 More practice Who starts off the getting of an address? The accounts system.

35 More practice Can the Accounts System cancel an order? No.

36 More practice During order entry, does the accounts system send information to the order entry clerk? Yes. The arrow does not indicate the direction of data flow. Data flow is always 2-way (unlike a DFD)

37 More practice Who is the passive actor during order entry? The accounts system.

38 More practice Who is the primary actor during order entry? The clerk.

39 Another example Use-case diagrams generally show groups of use cases. What can you deduce from this UCD?

40 Another example This system lets the band manager view a sales statistics report and the Billboard report for the band's CDs.

41 Another example It also lets the record manager view a sales statistics report and the Billboard report for a particular CD.

42 Another example Our system fetches Billboard reports from an external system called Billboard Reporting Service.

43 Another example In addition, the absence of use cases in this diagram shows what the system doesn't do. There is no way for a band manager to listen to songs from the different albums on the Billboard because we see no reference to a use case called Listen to Songs from Billboard 200. This absence is not a trivial matter. It might show developers that extra functionality is required of the system.

44 > like a subprogram denotes the inclusion of behaviour described by another use case. saves repetition and wasted space. Shown as a dotted line with “ >” label

45 > Both the Manage Customer Details and Enter Order use cases include the Find Customer Record use case. They both have the procedures from Find Customer Record in common.

46 > Like a conditional >. Only takes place under certain conditions. An > is a use case that extends another use case (the ‘base’ use case) when circumstances require it. When the extending use case’s activities are finished, the base use case’s activities resume from the point they branched off into the > use case.

47 > Like a conditional >. Only takes place under certain conditions. An > is a use case that extends another use case (the ‘base’ use case) when circumstances require it. When the extending use case’s activities are finished, the base use case’s activities resume from the point they branched off into the > use case.

48 > The extending use case is really an alternate course of the base use case It can be used to describe different actions to be taken dependent on current condition. In other words, it can indicate conditional branches in activities. Shown as a dotted line with “ >” label

49 > Note how some activities only take place if wine has been ordered. Note: Solid lines or arrows between use cases are not allowed. The only way to link use cases is with includes or extends.

50 Creating a UCD Then convert the text to a UCD: Clerk enters customer ID into system. If ID exists, account management module is triggered. Otherwise, New Account module is triggered. Then, clerk enters a product IDs of customer's purchase. If an item is not in stock, customer is advised of delay in delivery and the back-order process is triggered. 4 to 5 may be repeated Clerk then.... (etc)

51 Creating a UCD Then convert the text to a UCD: Clerk enters customer ID into system. If ID exists, account management module is triggered. Otherwise, New Account module is triggered. Then, clerk enters a product IDs of customer's purchase. If an item is not in stock, customer is advised of delay in delivery and the back-order process is triggered. 4 to 5 may be repeated Clerk then.... (etc)

52 System Boundaries You can draw a rectangle – the system boundary - around use cases to indicate the scope of the system. They are not often used. An example of their use is to mark off functional components that will be rolled out in different major releases of a system...

53 Getting more ambitious Are transcripts always distributed in this system? Explain your reasoning.

54 Generalisation Not examinable, but nice to know If there is a triangular arrowhead to a use case it indicates generalisation/specialisation. This means that one particular use case might have much in common with another more general use case Might have similar behaviours, constraints, requirements etc.

55 Generalisation If so, to save repetition, describe the use case just once for the general case. Where there are specific variations of this general case, just use the general case and describe the differences involved in the special cases.

56 Generalisation E.g. dealing with a customer order placed over the telephone, and dealing with an order placed over the internet have many things in common. There's only a small difference based on the source of the order. This can be shown like this:

57 Generalisation A general, multipurpose "Place order" use case is defined It contains all the behaviours that phone orders and internet orders have in common.

58 Generalisation The "Phone order" and "internet order" use cases contain just the specific behaviours required for each ordering method. Then they share the general behaviour described in the "Place order" case study.

59 Generalisation The Place order use-case (called the parent use case) may not only be used by the specialised (child) use cases. The parent may be used in its own right. The order registry clerk can enter the order for a customer The clerk can just follow the behaviours in Place order. Does not use child use cases needed when customers order themselves.

60 Another example

61 use cases: “customer uses machine”, “maintain machine” and “audit” Actors: “customer”, maintenance engineer“,”“local branch official” and “central computer”. actors are stick people (even where they are machines).

62 Another example Lines (associations) connect use cases to 1 or more actors box around the use cases emphasizes the boundary between the system (defined by the use cases) and the actors who are external.

63 Final examples Note how headed arrows show: the Local bank office initiates the ATM maintenance use case; the customer initiates the use of the ATM; the use of the ATM initiates interaction with the central computer.

64 What does this tell you?

65

66 And in their free time, ninja Use-case diagram actors go wild...

67 Practice Create a UCD to describe the following requirements of a new system. Customers can contact salesmen to make a purchase. Salesmen enter the sale into the sales database. Customers can track their sale’s progress via the database. The accounts department sends an invoice to the customer.

68 By Mark Kelly McKinnon Secondary College vceit.com These slideshows may be freely used, modified or distributed by teachers and students anywhere on the planet (but not elsewhere). They may NOT be sold. They must NOT be redistributed if you modify them. IT APPLICATIONS SLIDESHOWS


Download ppt "Software Development 2011-2014 Theory Slideshows By Mark Kelly Edited and Modified by Mr Hem Use Cases UML Use-case actors relaxing."

Similar presentations


Ads by Google