The document discusses UML (Unified Modeling Language) as a tool for object-oriented system design, highlighting its role in both forward and backward design processes. It outlines various UML diagrams, such as activity, use case, sequence, and class diagrams, emphasizing their utility in communicating system functionality and interactions. Additionally, it explains the concepts of inclusion and extension in use case diagrams, providing examples related to a university record system and a recycling machine system.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
Lecture8- UML Modeling
The document discusses UML (Unified Modeling Language) as a tool for object-oriented system design, highlighting its role in both forward and backward design processes. It outlines various UML diagrams, such as activity, use case, sequence, and class diagrams, emphasizing their utility in communicating system functionality and interactions. Additionally, it explains the concepts of inclusion and extension in use case diagrams, providing examples related to a university record system and a recycling machine system.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24
Lecture # 8
UML modeling Asst. Prof. Ayesha Kanwal SEECS UML language
UML: pictures of an OO system
programming languages are not abstract enough for OO design UML is an open standard; lots of companies use it What is legal UML… a descriptive language: rigid formal syntax (like programming) a prescriptive language: shaped by usage and convention it's okay to omit things from UML diagrams if they aren't needed by team/supervisor/instructor Uses of UML
as a sketch: to communicate aspects of
system forward design: doing UML before coding backward design: doing UML after coding as documentation often done on paper used to get rough selective ideas as a programming language: with the right tools, code can be auto-generated and executed from UML only good if this is faster than coding in a "real" language UML diagrams
Activity diagrams, which show the
activities involved in a process or in data processing . Use case diagrams, which show the interactions between a system and its environment. Sequence diagrams, which show interactions between actors and the system and between system components. Class diagrams, which show the object classes in the system and the What is a Use Case Diagram? Explains what the main functionality of the system is Mainly cares for the system’s expected behavior (what) rather that how it is done! A use case diagram is an excellent way to communicate to management, customers, and other non- development people what a system will do when it is completed. Use case Diagram Use case Diagrams- Actors Use case Diagram- Use cases Example 1 Contd… Example 1(text in red shows actors text in green shows use cases) Example 1- Use case Diagram University Record System (URS) Some Actions Supported by URS Use case Diagram- URS Use case Diagram for Student Assessment Management System Use case Diagram- Relationships Inclusion A base use case is dependent on the included use case(s); without it/them the base use case is incomplete as the included use case(s) represent sub- sequences of the interaction that may happen always OR sometimes In the best practice of one way dependency, the base use case knows about (and refers to) the included use case, but the included use case shouldn’t ‘know’ about the base use case. This is why included use cases can be: base use cases in their own right and Example Example Extends The extending use case is dependent on the base use case; it literally extends the behaviour described by the base use case. The base use case should be a fully functional use case in its own right without extending use case’s additional functionality. Extending use cases can be used in several situations: The base use case represents the “must have” functionality of a project while the extending use case represents optional (should/could/want) behaviour. This is where the term optional is relevant – optional whether to build/deliver rather than Example Use Case – Example ( generalize relationship): Actor-to- Actor relationship Class Activity
We are after a system that controls a recycling machine for
returnable bottles and cans. The machine will allow a customer to return bottles or cans on the same occasion. When the customer returns an item, the system will check what type has been returned. The system will register how many items each customer returns and, when the customer asks for a receipt, the system will print out what he deposited, the value of the returned items and the total return sum that will be paid to the customer. The system is also be used by an operator. The operator wants to know how many items of each type have been returned during the day. At the end of the day, the operator asks for a printout of the total number of items that have been deposited in the machine on that particular day. The operator should also be able to change information in the