Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2008 Prentice Hall, Ovidiu Noran Tutorial 7 1 Logic Requirements (Textbook Chapter 8 & Appendix)

Similar presentations


Presentation on theme: "© 2008 Prentice Hall, Ovidiu Noran Tutorial 7 1 Logic Requirements (Textbook Chapter 8 & Appendix)"— Presentation transcript:

1 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 1 Logic Requirements (Textbook Chapter 8 & Appendix)

2 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 2 Learning Objectives Practice Logic Modelling - Structured English and decision tables to representing steps in logical processes in DFDs and choice in conditional statements Practice Sequence Diagrams Practice Activity Diagrams Understand how logic modeling techniques apply to the development of electronic commerce applications.

3 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 3 Represent the decision logic below in Structured English Ch. 8, Ex. 1: Part 1: Decision Logic

4 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 4 Possible solution: Ch. 8, Ex. 1 (cont.): BEGIN IF IF Employee-Type is Salary THEN PAY base salary END IF BEGIN IF IF Employee-Type is Hourly AND Hours-Worked is 40 THEN CALCULATE hourly wage AND CALCULATE overtime END IF

5 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 5 Generate Structured English and Decision table logic modelling for some processes described in the DFD below Ch. 8, Ex. 2 (part):

6 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 6 Structured English representation for process 5.0: Ch. 8, Ex. 2 (cont.): DO ACCEPT Inventory-record-id READ Inventory-record for Inventory-record-id PRINT Quantity-in-stock and Inventory-item-name UNTIL End-of-file Decision table for process 4.0:

7 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 7 What types of questions need to be asked during reqs. determination to gather the logic modelling information? Ch. 8, Ex. 3: Start with the processes represented in the DFDs. Elicit information from users that will help model the logic within these processes and the events that initiate each process. Determine the process decision and temporal logic involved in the users' business processes. Ask the users to literally describe what happens in each of the processes on the data flow diagrams.  when does the process occur?  what are the explicit steps?  how and by whom are they performed?  in what sequence and at what time are they performed?  are there any conditions, constraints, or contingencies on any of these steps happening? If so, what are they and how do they happen? Observe the actual processes. Do they fit with what users describe?

8 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 8 Use Structured English to represent the logic in the following narrative: Ch. 8, Ex. 4: In a company the rules for buying perosnal computers are such that if the purchase is over $15,000 it has to go out for bid and the Request for Proposals must be approved by the Purchasing Department. If the purchase is under $15,000, the personal computers can simply be bought from an approved vendor; however, the Purchase order must still be approved by the Purchasing department. If the purchase goes out for bid, there must be at least three proposals received for the bid. If not, the RFP must go out again. If still there are not enough proposals, the process can continue with the vendors that have submitted proposals. The winner of the bid must be on an approved list of vendors for the company and, in addition, must not have any violations against them for e.g. environmental matters. At this point, if the proposal is complete, the Purchasing Department can issue a Purchase Order.

9 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 9 (Main) BEGIN IF IF Purchase-amount is greater than $15,000.00 THENPurchasing–Department APPROVES RFP DO Bid Process ELSEPurchasing-Department APPROVES Purchase PURCHASE equipment END IF (Bid Process) SEND RFP BEGIN IF IF three Proposals received AND Winning-Vendor is APPROVED by Purchasing-Department AND no Violations THEN AWARD contract PURCHASE equipment ELSE DO Rebid Process END IF RETURN Ch. 8, Ex. 4 (cont.):

10 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 10 (Rebid Process) SEND RFP BEGIN IF IF Winning-Vendor is APPROVED by Purchasing-Department AND no Violations THEN AWARD contract PURCHASE equipment END IF ISSUE Purchase Order RETURN Ch. 8, Ex. 4 (cont.)

11 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 11 Ch. 8, Ex. 6 Present the logic of business processes described in the previous exercise in a decision table. How do decision tables compare with Structured English for this example?

12 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 12 Ch. 8, Ex. 6 (cont.) How do decision tables compare with Structured English for this example? Several fairly complicated conditions are present hence the Structured English approach may be better. Several decision tables could be used as well. Again, the decision tables are good at reviewing / optimising the decision logic but not at determining conditions and actions or at transforming conditions and actions into sequence

13 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 13 The Hire Employee use case / scenario Part 2: Seq. & Activity Diagrams

14 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 14 Assume there is only one scenario within the use case. 1. On receipt of a job application, the applicant data is entered through the application entry window 2. The manager opens the app review window and reviews the application 3. If the initial review is negative, the manager discards the app and conveys the rejection decision to applicant 4. If initial review is positive, the manager sets up a date and time to interview the applicant. The manager also requests that the referees specified in the app provide recommendation letters 5. The manager interviews the candidate and enters the info the application file 6. When the recommendation letters come in, the manager is ready to make a decision. Based on the summary, a decision is made. If the decision is to reject, the application is discarded and the applicant is notified. The processing of the application comes to an end 7. If the decision is to hire the candidate, a potential employee file is created and all relevant info is entered into this file. The hiring decision is conveyed to applicant.

15 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 15 Sequence Diagram for Hire Employee Explicitly shown external actor Decision logic :

16 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 16 Ch. 8 App, Ex. 4 Draw an activity diagram for the previous employee hiring process.

17 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 17

18 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 18 Manufactures high-quality wood furniture Distributes to retail stores within the U.S. Started in the early 1980s and expanded by 1984 doubling sales volume By 1990, Pine Valley Furniture had become a complex company, employing over 50 persons Case Study: Pine Valley Furniture (PVF) Part 3

19 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 19 Pine Valley Furniture development methodology dictated that the logic within each unique processes be represented. Structured English was chosen for modelling the logic. PVF: Logic Modelling

20 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 20 Level-0 data flow diagram for the PVF WebStore

21 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 21 PVF: Logic Modelling

22 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 22 E-commerce App: Logic Modelling Process 3 decomposition DFD for the PVF WebStore

23 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 23 E-commerce App: Logic Modelling

24 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 24 E-commerce App: Logic Modelling

25 © 2008 Prentice Hall, Ovidiu Noran Tutorial 7 25 Summary In this tutorial you practiced: Logic Modelling - Structured English and decision tables Sequence Diagrams Activity Diagrams Logic modelling techniques applied to the development of electronic commerce applications.


Download ppt "© 2008 Prentice Hall, Ovidiu Noran Tutorial 7 1 Logic Requirements (Textbook Chapter 8 & Appendix)"

Similar presentations


Ads by Google