Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Introduction to UML-Basics of Software Engineering-Lecture Slides, Slides of Software Engineering

This lecture is part of lecture series for Software Engineering course. Prof. Prateek Aron delivered this lecture at Allahabad University. Its main points are: Unified, Modeling, Language, Case, Diagrams, Class, Sequence, State, Interactive, Clarifying

Typology: Slides

2011/2012

Uploaded on 07/16/2012

sanaka
sanaka 🇮🇳

4.6

(18)

77 documents

1 / 27

Toggle sidebar

Related documents


Partial preview of the text

Download Introduction to UML-Basics of Software Engineering-Lecture Slides and more Slides Software Engineering in PDF only on Docsity! 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 1 COMP201 - Software Engineering docsity.com 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 library.  The library currently uses a 1960s program, written in an obsolete language, for some simple bookkeeping tasks, and a card index for user browsing.  You are asked to build an interactive system which handles both of these aspects online. 2 COMP201 - Software Engineering docsity.com 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. 5 COMP201 - Software Engineering docsity.com 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 BookBorrower representing the person who interacts with the system to borrow a book  A use case is a task which an actor needs to perform with the help of the system,  such as Borrow copy of Book. 6 COMP201 - Software Engineering docsity.com 7 Use Case Diagram for the Library COMP201 - Software Engineering docsity.com 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:  Borrow copy of book, Return copy of book, Borrow journal, Return Journal 10 COMP201 - Software Engineering docsity.com 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 11 docsity.com 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 12 docsity.com Removing Superfluous Candidates  In this particular case, we discard:  Library, because it is outside the scope of our system  Short term loan, because a loan is really an event, which so far as we know is not a useful object in this system  Member of the library, which is redundant  Week, because it is a measure, not a thing  Item, because it is vague (we need to clarify it)  Time, because it is outside the scope of the system  System, because it is part of the meta-language of requirements description, not a part of the domain  Rule, for the same reason 15 COMP201 - Software Engineering docsity.com This leaves:  Book  Journal  Copy (of book)  Library member  Member of staff 16 COMP201 - Software Engineering docsity.com 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 library system example.. 17 COMP201 - Software Engineering docsity.com Revised Library Class Model 20 COMP201 - Software Engineering docsity.com 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 21 COMP201 - Software Engineering docsity.com An Example Sequence Diagram  Consider what happens in the library scenario when a user wishes to borrow a copy of a book.  The library member must first check that they are able to borrow a book (i.e., they have borrowing privileges, there exists at least one remaining copy of the book etc.)..  Then the copy object must be informed that the library member wishes to borrow the copy of the book..  Finally the copy object must then tell the individual book object that it is out on loan and thus no longer available.  We now see how this is recorded in a sequence diagram 22 COMP201 - Software Engineering docsity.com State Diagrams  Objects in the system have a state which is all the data which it currently encapsulates  For example, a Book object in the library system can be “borrowable” or “not borrowable”.  Running methods on the object can cause a change in state, i.e., by borrowing the book we change its internal state.  Changes in object states can be modelled by a state diagram.. COMP201 - Software Engineering 25 docsity.com Changes of the System: State Diagrams  State diagram for class Book  We will consider state diagrams again in more detail in a later lecture 26 COMP201 - Software Engineering docsity.com 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 27 docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved