Using UML Patterns and Java Object Oriented Software Engineering Chapter 2 Modeling with UML Application and Solution Domain Application Domain Requirements Analysis The environment in which the system is operating Solution Domain System Design Object Design The available technologies to build the system Application Domain Application Domain Model UML Package TrafficControl Aircraft SummaryDisplay TrafficController FlightPlan Solution Domain System Model Airport MapDisplay FlightPlanDatabase TrafficControl Is the system part of the Domain or part of the Solution Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 2 What is UML UML Unified Modeling Language An emerging standard for modeling object oriented software Resulted from the convergence of notations from three leading object oriented methods OMT James Rumbaugh OOSE Ivar Jacobson Booch Grady Booch Reference The Unified Modeling Language User Guide Addison Wesley 1999 Supported by several CASE tools Rational ROSE TogetherJ Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 3 UML First Pass You can model 80 of most problems by using about 20 UML We teach you those 20 Use case Diagrams What system Describe the functional behavior of the system as seen by the user Class diagrams Are class diagrams of this sort about requirements or design Describe the static structure of the system Objects Attributes Associations Sequence diagrams Are sequence diagrams of this sort about requirements or design Describe the dynamic behavior between actors and the system and between objects of the system Statechart diagrams Are StateCharts of this sort about requirements or design Describe the dynamic behavior of an individual object essentially a finite state automaton Activity Diagrams Are activity diagrams of this sort about requirements or design Model the dynamic behavior of a system in particular the workflow essentially a flowchart Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java Collaboration Object Component Deployment diagrams in UML 1 x 4 UML Core Conventions Rectangles are classes or instances Ovals are functions or use cases states Instances are denoted with an underlined names myWatch SimpleWatch Joe Firefighter Types are denoted with non underlined names SimpleWatch Firefighter Diagrams are graphs Nodes are entities Arcs are relationships between entities Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 5 Use Case Diagrams Used during requirements elicitation to represent external behavior Actors represent roles that is a type of user of the system Passenger Use cases represent a sequence of interaction for a type of functionality The use case model is the set of all use cases It is a complete description of the functionality of PurchaseTicket the system and its environment What would the functionality of the environment mean Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 6 Actors An actor models an external entity which communicates with the system User External system Physical environment Passenger An actor has a unique name and an optional description Examples Passenger A person in the train GPS satellite Provides the system with GPS coordinates course project Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 7 Use Case A use case represents a class of functionality provided by the system as an event flow A use case consists of PurchaseTicket Unique name Participating actors Entry conditions Flow of events Exit conditions Special requirements Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 8 Use Case Diagram Example Name Purchase ticket Participating actor Passenger Entry condition Passenger standing in front of ticket distributor Passenger has sufficient money to purchase ticket Event flow 1 Passenger selects the number of zones to be traveled 2 Distributor displays the amount due 3 Passenger inserts money of at least the amount due 4 Distributor returns change 5 Distributor issues ticket Exit condition Passenger has ticket Use case diagrams represent external behavior Use case descriptions provide meat of model not the use case diagrams All use cases need to be described for the model to be useful Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 9 Class Diagrams OO TarifSchedule Enumeration getZones Price getPrice Zone Trip zone Zone Price Price Class diagrams represent the structure of the system Used during requirements analysis to model problem domain concepts during system design to model subsystems and interfaces during object design to model classes Is this from user s point of view Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 10 Classes Name TarifSchedule zone2price getZones getPrice Attributes TarifSchedule Table zone2price Enumeration getZones Price getPrice Zone Signature Operations TarifSchedule A class represent a concept A class encapsulates state attributes and behavior operations Each attribute has a type Each operation has a signature The class name is the only mandatory information Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 11 Instances tarif 1974 TarifSchedule zone2price 1 20 2 40 3 60 An instance represents a phenomenon The name of an instance is underlined and can contain the class of the instance The attributes are represented with their values Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 12 Actor vs Instances What is the difference between an actor a class and an instance Actor An entity outside the system to be modeled interacting with the system Passenger Class An abstraction modeling an entity in the problem domain must be modeled inside the system User Would you agree Object A specific instance of a class Joe the passenger who is purchasing a ticket from the ticket distributor Bernd Bruegge Allen H Dutoit Object Oriented Software Engineering Using UML Patterns and Java 13 Associations TarifSchedule TripLeg Enumeration getZones Price getPrice Zone Price Zone Associations denote relationships between classes The multiplicity of an association end denotes how many objects the source object can legitimately
View Full Document
Unlocking...