Software Engineering COMP 201

Slides:



Advertisements
Similar presentations
Writing Good Use Cases - Instructor Notes
Advertisements

Use Case Diagrams.
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Requirements Engineering Process
Chapter 7 System Models.
Requirements Engineering Process
Objectives To introduce software project management and to describe its distinctive characteristics To discuss project planning and the planning process.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Software Engineering COMP 201
Chapter 7 – Design and Implementation
Week 2 The Object-Oriented Approach to Requirements
Requirements Diagrams With UML Models
Configuration management
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 5 Slide 1 Project management.
Software Engineering COMP 201
Software Engineering COMP 201
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Use Case Diagrams.
Problem Solving and Algorithm Design
Lecture 8: Testing, Verification and Validation
Lecture 6: Software Design (Part I)
Lecture 5: Requirements Engineering
Systems Analysis and Design with UML Version 2.0, Second Edition
Global Analysis and Distributed Systems Software Architecture Lecture # 5-6.
UML an overview.
Chapter 11 Describing Process Specifications and Structured Decisions
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Chapter 4 - Object-Oriented Analysis and Design in a Nutshell1 Chapter 4 Object-Oriented Analysis and Design in a Nutshell.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Use Case - Example University library system requirements
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Introduction To System Analysis and Design
Chapter 14 Requirements and Specifications. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Software Engineering The implementation.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Documenting Requirements using Use Case Diagrams
Software Engineering CSE470: Requirements Analysis 1 Requirements Analysis Defining the WHAT.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
© Copyright Eliyahu Brutman Programming Techniques Course.
IS550: Software requirements engineering Dr. Azeddine Chikh 4. Validation and management.
1 SWE Introduction to Software Engineering Lecture 11 - Requirements Engineering Processes.
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Software Engineering Case Study Slide 1 Introductory case study.
Software Engineering 2003 Jyrki Nummenmaa 1 USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write.
Introduction To System Analysis and design
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa USE CASES In this lecture: Use cases - What are use.
Use Case modelling 1. Objectives  Document user requirements with a model  Describe the purpose of an actor and a use case  Construct a use case model.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
Chapter 4 – Requirements Engineering Lecture 3 1Chapter 4 Requirements engineering.
Key Takeaway Points A use case is a business process; it begins with an actor, ends with the actor, and accomplishes a business task for the actor. Use.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Diagrams.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Chapter 5 – System Modeling
Welcome to M301 P2 Software Systems & their Development
Chapter 5 System modeling
By Dr. Abdulrahman H. Altalhi
Seminar 2 Design of Informatics Systems
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Engineering Quality Software
Lecture 8 Object Concepts
Presentation transcript:

Software Engineering COMP 201 Lecturer: Sebastian Coope Ashton Building, Room G.18 E-mail: coopes@liverpool.ac.uk COMP 201 web-page: http://www.csc.liv.ac.uk/~coopes/comp201 Lecture 18 – Introductory Case Study

Introduction to UML During this lecture, we shall see how various features of the Unified Modeling Language (UML) can help to reduce ambiguities and increase understanding of a proposed system We will be studying an introductory case study based on a library system and giving an introduction to: Use case diagrams Class diagrams Sequence diagrams State diagrams COMP201 - Software Engineering

The Problem The most difficult part of any design project is understanding the task you are attempting Example: you have been contacted to develop a computer system for a university medical clinic. The clinic needs the following types of service Staff management Booking appointments Keeping records You are asked to build an interactive system which handles all of these aspects online. COMP201 - Software Engineering

Clarifying the Requirements Different users will have different, sometimes conflicting, priorities Users are not likely to have clear, easily expressed views of what they want It is hard to imagine working with a system of which you have only seen a description COMP201 - Software Engineering

Facts about the Requirements Doctors, patients, admin staff Appointments Treatments Homework Specify the facts about the requirements that an ideal system would satisfy. COMP201 - Software Engineering

Use Case Model If a system is to be seen as having high quality, it must meet the needs of its users. So we take a user-oriented approach to systems analysis. We identify the users of the system and the tasks they must undertake with the system. We also seek information about which tasks are most important, so that we can plan the development accordingly. COMP201 - Software Engineering

What do we Mean by “Users” and “Tasks”? UML uses as technical terms “actors” and “use cases” An actor is a user of a system in a particular role (an actor can also be an external system) For example. Our system will have an actor Receptionist representing the person who interacts with the system to book an appointment A use case is a task which an actor needs to perform with the help of the system, such as BookAppointment COMP201 - Software Engineering

Use Case Diagram for the clinic COMP201 - Software Engineering

Scope and Iterations To limit the risk, it is better to aim to get to the ideal system in several steps or iterations. The first iteration results in the delivery of a system with only the most basic and essential functionality; Later iterations enhance the system One of the main purposes of use cases is to help identify suitable dividing lines between interactions: An interaction can deliver enough of the system to allow certain use cases to be carried out, but not others COMP201 - Software Engineering

Limiting Requirements It is important not to invent new requirements for the system. After examining use-cases, it is often easy to think of new things the system could or should do, but these must first be discussed with the customer. For example, perhaps it would be good to inform the doctor that a drug is out of stock via their online system? But this may not be what is wanted by the Dr, this may cause an overload of information! COMP201 - Software Engineering

Use Case Diagram for the First Iteration Let us suppose that after discussing priorities with the customers we decide that the first iteration of the system should provide: View appointments, schedule appointment, cancel appointment, re-book appointment, request repeat prescription COMP201 - Software Engineering

Use Case Advantages It may be easier to identify the amount of time required to implement all the required features of the system. Such details can often be optimistically overlooked. We can identify which requirements are important to key strategic (or most influential) personnel in the company. By providing this functionality early, we can show the potential value of the software and avoid the project being cancelled. COMP201 - Software Engineering

Use Case Advantages We may decide to implement more risky use cases first since we would hopefully still have contingency to tackle problems that arise In other words, early in the development we have more flexibility in terms of time, money, design choices etc. Use cases can be used to derive validation checks on the developed system, in order that it provides all required functionality. COMP201 - Software Engineering

Identifying Classes In the standard jargon of analysis we often talk about the key domain abstractions. Identifying the right classes is one of the main skills of OO development. We start the process of identifying the key domain abstractions using the following approach, which is known as the noun identification technique. COMP201 - Software Engineering

Identifying a list of candidate classes Clinic, appointments and treatment system Before seeing a doctor or nurse the patient needs to make an appointment. The appointment will be made by the receptionist, before making the appointment the patient needs to ask the patient which doctor they wish to see and if the appointment is a standard appointment or urgent appointment. The receptionist will use this information, check the appointment schedule and find a free slot and make the booking. When the patient sees the Dr, the Dr will sometimes issue a prescription. The patient may at some time request a repeat issue of their prescription. Receptionists can also cancel appointments. Each doctor has a maximum of 2000 patients registered to them. Take a coherent, concise statement of the requirement of the system Underline its noun and noun phrases, that is, identify the words and phases that denote things This gives a list of candidate classes, which we can then whittle down and modify to get an initial class list for the system COMP201 - Software Engineering

Removing Superfluous Candidates In this particular case, we discard: Clinic, because it is outside the scope of our system Urgent appointment redundant covered by appointment Member of the library, which is redundant Time, because it is a measure, not a thing Free slot, because it is vague (we need to clarify it) System, because it is part of the meta-language of requirements description, not a part of the domain COMP201 - Software Engineering

This leaves: Doctor Nurse Receptionist Patient Appointment Prescription COMP201 - Software Engineering

Relations between Classes Next we identify and name important real-world relationships or associations between our classes We do this for two reasons: To clarify our understanding of the domain, by describing our objects in terms of how they work together; To sanity-check the coupling in our system, i.e. make sure that we are following good principles in modularising our design We shall now see the relations for the clinic system example.. COMP201 - Software Engineering

Initial Class Model of the Library These are multiplicities which we shall study in detail next lecture.. COMP201 - Software Engineering

Lets Revise our Class Model Finally, we may notice that Doctor shares all the same associations that Nurse does, and that this agrees with our intuition that both nurse and doctor are health care staff. Recording this in the class diagram will clarify our understanding of the situation, that there is a generalization relationship between these classes Inheritance, Dr and Nurse are both health care staff and receptionist is also staff Notice Staff and HealthCareStaff are additional classes to help with inheritance COMP201 - Software Engineering

Revised Library Class Model (hierarchy) COMP201 - Software Engineering

Revised Library Class Model COMP201 - Software Engineering

The System in Action A class diagram gives a static view of the system, but we know nothing about the dynamic behaviour In UML we can use interaction diagrams to show how messages pass between objects of the system to carry out some task This will also show how the various classes realize the different use cases we identified in the use case diagram COMP201 - Software Engineering

An Example Sequence Diagram Consider what happens in the appointment booking scenario when a user wishes to make an appointment The receptionist must check that the person is a valid patient Then the doctor object must be checked to see if there are any available appointments If there are any suitable slots available, a new appointment should be created and assigned to the doctor. We now see how this is recorded in a sequence diagram COMP201 - Software Engineering

Interaction Shown on a Sequence Diagram COMP201 - Software Engineering

Sequence Diagrams We shall see more on sequence diagrams later, but note their general structure and that they record which actors and classes are involved in an interaction. In this example the interaction is very simple, there is a single execution path and nothing occurs in parallel; in more complex scenarios, sequence diagrams can clarify the working of a system to a greater extent COMP201 - Software Engineering

State Diagrams Objects in the system have a state which is all the data which it currently encapsulates For example, a Doctor object on the library system can be available or fully booked Running methods on the object can cause a change in state, i.e., by booking appointments to the doctor object we change its internal state. Changes in object states can be modelled by a state diagram.. COMP201 - Software Engineering

Changes of the System: State Diagrams State diagram for class Doctor We will consider state diagrams again in more detail in a later lecture COMP201 - Software Engineering

Lecture Key Points We have seen an introduction to the Unified Modelling Language (UML) We studied an introductory case study based on a library system with an introduction to: Use case diagrams Class diagrams Sequence diagrams State diagrams COMP201 - Software Engineering