![Page 1: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/1.jpg)
Session 3 - Exception-Handling Java Programming
11TCS Confidential
Unified Modeling Language (UML)
![Page 2: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/2.jpg)
Session 3 - Exception-Handling Java Programming
22TCS Confidential
UML - BriefUnified Modeling LanguageInvented by
Grady BoochJim RumbaughIvar Jacobson
Useful in OOADCurrent version is UML 2.0 (June-2003 )
![Page 3: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/3.jpg)
Session 3 - Exception-Handling Java Programming
33TCS Confidential
Ways of Using UMLUML as sketch
Gives Rough overall idea of a systemCan be done with pen and paper
UML as blueprint Gives complete idea of a systemTools are available in market like Rational Suite Tools
UML as programming languageUML diagram to code generation. ( Helps in speed up the development )Code to UML diagram(Help in understanding the system)
![Page 4: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/4.jpg)
Session 3 - Exception-Handling Java Programming
44TCS Confidential
Ways of Using UML
Software perspectiveThe elements of UML map directly
to elements in a software systemConceptual perspective
Helps in understanding the functionality of system
![Page 5: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/5.jpg)
Session 3 - Exception-Handling Java Programming
55TCS Confidential
UML DiagramsUse case DiagramActivity DiagramClass DiagramSequence DiagramState DiagramComponent DiagramDeployment Diagram
![Page 6: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/6.jpg)
Session 3 - Exception-Handling Java Programming
66TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
![Page 7: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/7.jpg)
Session 3 - Exception-Handling Java Programming
77TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
Defines the functionalities made available by system
to users
![Page 8: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/8.jpg)
Session 3 - Exception-Handling Java Programming
88TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
Defines entities along with
relationships to understand working
of system
![Page 9: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/9.jpg)
Session 3 - Exception-Handling Java Programming
99TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
Captures objects interaction to realize
the system behaviour
![Page 10: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/10.jpg)
Session 3 - Exception-Handling Java Programming
1010TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
Captures important components and
their dependencies
![Page 11: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/11.jpg)
Session 3 - Exception-Handling Java Programming
1111TCS Confidential
System Views
Users’ View
Structural View
Behavioral View
Implementation View
Environmental View
Models different components
implementation on hardware
![Page 12: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/12.jpg)
Session 3 - Exception-Handling Java Programming
1212TCS Confidential
UML – Users’ View
Use Case Diagram
![Page 13: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/13.jpg)
Session 3 - Exception-Handling Java Programming
1313TCS Confidential
Use CaseUse case is chunk of functionalitye.g. Customer registration, money transfer, purchase itemUseful for capturing functional and non-functional requirementsDescribes interactions between users and system
![Page 14: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/14.jpg)
Session 3 - Exception-Handling Java Programming
1414TCS Confidential
Use Case - ComponentsProcess : Functionality that system should provide
Actor : Someone that is external to the system. But that is going to interact with the system
![Page 15: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/15.jpg)
Session 3 - Exception-Handling Java Programming
1515TCS Confidential
Use Case - Relationships
GeneralizationIncludeExtends
![Page 16: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/16.jpg)
Session 3 - Exception-Handling Java Programming
1616TCS Confidential
GeneralizationChild use case(s) inherit the behavior and meaning of parent use case
Pay fee
through credit card
through cheque
![Page 17: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/17.jpg)
Session 3 - Exception-Handling Java Programming
1717TCS Confidential
Product purchase use case compulsorily and automatically includes behavior of the customer authentication use case
Customer authentication
Product Purchase
<< Include >>
Include
![Page 18: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/18.jpg)
Session 3 - Exception-Handling Java Programming
1818TCS Confidential
Use to show optional system behavior only under certain conditions
For international student, security check is required while enrolling
Extends
Perform security check
Enroll in university
Student
<< extends>>
International Student
![Page 19: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/19.jpg)
Session 3 - Exception-Handling Java Programming
1919TCS Confidential
Use Case Diagram – Example
Customer
Buy a Product
Browse catalog and select
items
<<include>>
![Page 20: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/20.jpg)
Session 3 - Exception-Handling Java Programming
2020TCS Confidential
Use Case Document templateIntroduction (Brief about functionality)Actors detailPre-conditionMain pathAlternative pathException / Error situationPost-conditionDetails of non-functional requirements like security/availability/performance etc
![Page 21: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/21.jpg)
Session 3 - Exception-Handling Java Programming
2121TCS Confidential
Use Case Packaging
Query balance
Print Balance sheet
Receive grant
Make payment
Accounts
Enroll student
Compute CGPA
Enter grade
Academics
Print grade card
Modify grade
![Page 22: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/22.jpg)
Session 3 - Exception-Handling Java Programming
2222TCS Confidential
UML – Structure View
Class Diagram
![Page 23: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/23.jpg)
Session 3 - Exception-Handling Java Programming
2323TCS Confidential
Class DiagramDescribes how the system is structured rather than how it behaves.
Describes various objects in the system and the relationships among them
![Page 24: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/24.jpg)
Session 3 - Exception-Handling Java Programming
2424TCS Confidential
ClassCore element of Class diagramUsed to represent entities in system, often relate to real-world object
-name: String-contactPerson: Client-employees: Client[]
Company
+getName: String
Name
Attribute
Operation
![Page 25: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/25.jpg)
Session 3 - Exception-Handling Java Programming
2525TCS Confidential
Class – Attribute & OperationAttribute is property of Class
E.g. address, city
Operation is function that class can perform
E.g. getAddress(), getCity()
![Page 26: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/26.jpg)
Session 3 - Exception-Handling Java Programming
2626TCS Confidential
Attribute & Operation ScopeAttribute / Operation of class has four scopes- Private+ Public# Protected~ default (within package)
![Page 27: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/27.jpg)
Session 3 - Exception-Handling Java Programming
2727TCS Confidential
Class Diagrams - RelationshipsAssociationCompositionAggregationGeneralizationRealizationDependency
![Page 28: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/28.jpg)
Session 3 - Exception-Handling Java Programming
2828TCS Confidential
Association
Describes connection between classes
Neither of the classes have ownership.
Library Member BookBorrowed by
1 *
![Page 29: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/29.jpg)
Session 3 - Exception-Handling Java Programming
2929TCS Confidential
Direct AssociationDescribes connection between class where in one class will have ownership.
Order OrderLine1 *
Item
1
1
![Page 30: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/30.jpg)
Session 3 - Exception-Handling Java Programming
3030TCS Confidential
CompositionRepresents whole-part relationships where the lifetime of the aggregated class is bound by the lifetime of this association's class.
Order is compose of OrderLine. On deletion of Order associated OrderLines will be deleted.
1Order OrderLine
*
![Page 31: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/31.jpg)
Session 3 - Exception-Handling Java Programming
3131TCS Confidential
AggregationRepresents whole-part relationships where lifetime of the aggregated class is independent of the lifetime of this association's class.
OrderLine is an aggregate of Item. Deletion of OrderLine will not delete Item associated to it.
1OrderLine Item
1
![Page 32: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/32.jpg)
Session 3 - Exception-Handling Java Programming
3232TCS Confidential
GeneralizationRelationship between a more specific element and a less specific element.Defines the inheritance structure in the model.Generalization relationships can be created between two Java classes or two Java interfaces .
![Page 33: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/33.jpg)
Session 3 - Exception-Handling Java Programming
3333TCS Confidential
Generalization
NamePhone NumberEmail Address
Person
SalaryStudent NumberAverage Mark
Student Professor
Is Eligible To EnrollGet seminars taken
Purchase Parking Pass
![Page 34: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/34.jpg)
Session 3 - Exception-Handling Java Programming
3434TCS Confidential
RealizationSpecify where a (concrete) modeled Java class is used to implement a modeled Java interfaceThis is generated as an implements keyword in the implementing Java class
![Page 35: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/35.jpg)
Session 3 - Exception-Handling Java Programming
3535TCS Confidential
RealizationA class that implements an interface can provide an implementation for some or all the abstract operations of the interface. If an interface's operations are only partially implemented by a class, that class is then defined as abstract
![Page 36: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/36.jpg)
Session 3 - Exception-Handling Java Programming
3636TCS Confidential
Realization
+sort():voidSortable
-id: int-products: Product[]
-name: String-contactPerson: Client-employees: Client[]
Company ProductGroup
+sort(): void+sort():void
![Page 37: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/37.jpg)
Session 3 - Exception-Handling Java Programming
3737TCS Confidential
Dependency
Shows that a change to independent class requires changes in dependent class.
e.g. Class invoke method of other class
Dependent Class
Independent Class
![Page 38: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/38.jpg)
Session 3 - Exception-Handling Java Programming
3838TCS Confidential
A Simple Class Diagram
Product
Order Linequantity: Integerprice: Money
OrderdateRec: Date [0..1]isPrePaid: Bool [1]Number: String [1]price: Money
dispatchclose
Customername [1]address [0..1]
getCreditRating(): String
Corporate Customer
contactNamecreditRatingcreditLimit
Personal Customer
creditCardNumber
Employee
*
*
*
*
1
1
1
0..1salesRep
{getCreditRating() == “poor”}
{if Order.customer.getCreditRating
is poor then Order,isPrePaidmust
be true}
lineItems
![Page 39: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/39.jpg)
Session 3 - Exception-Handling Java Programming
3939TCS Confidential
UML – Behavioral View
Sequence DiagramCollaboration DiagramActivity DiagramState-Chart Diagram
![Page 40: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/40.jpg)
Session 3 - Exception-Handling Java Programming
4040TCS Confidential
Sequence DiagramShow object interaction arranged in a time sequenceHelp us in determining the responsibility of the different classes e.g. What method should be supported by each class
![Page 41: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/41.jpg)
Session 3 - Exception-Handling Java Programming
4141TCS Confidential
Sequence Diagram
Obj2Obj1Object
participating in the
interactionObjects’life line
Message Time for which object is active
Return Message
![Page 42: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/42.jpg)
Session 3 - Exception-Handling Java Programming
4242TCS Confidential
Sequence Diagram – ScenarioWe want to calculate price of an OrderOrder contains more then one line itemsEach line item has product informationBased on the product price & required quantity base price is calculatedOrder then needs to compute overall discount (based on rules tied to customer)
![Page 43: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/43.jpg)
Session 3 - Exception-Handling Java Programming
4343TCS Confidential
Sequence Diagram – An Example
![Page 44: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/44.jpg)
Session 3 - Exception-Handling Java Programming
4444TCS Confidential
Sequence Diagram: Creating & Deleting ParticipantsaHandler
aQueryCommand
query db
new
new
results
resultsextract results
execute
aDatabaseStatement
![Page 45: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/45.jpg)
Session 3 - Exception-Handling Java Programming
4545TCS Confidential
Sequence Diagram: Loops & Conditionalsprocedure
foreach (lineitem)if (product.value > Rs.10k)
careful.dispatchelse
regular.dispatchend if
end forif (needsConfirmation)
messenger.confirmend procedure
![Page 46: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/46.jpg)
Session 3 - Exception-Handling Java Programming
4646TCS Confidential
Sequence Diagram: Loops & Conditionals:Order regular:
Distributor:Messengercareful:
Distributordispatch
altloop
opt
[for each line item]
[value > Rs.10000]
[else]
dispatch
dispatch
confirm[needsConfirmation]
![Page 47: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/47.jpg)
Session 3 - Exception-Handling Java Programming
4747TCS Confidential
Collaboration diagramShows both structural and behavioral aspects
Structural aspect: Objects and links between them
Behavioral aspect: message exchange between objects
![Page 48: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/48.jpg)
Session 3 - Exception-Handling Java Programming
4848TCS Confidential
Collaboration diagram
anOrder
anOrderLine aProduct
aCustomer
1: calcPrice
1.1: getProduct()1.2: getQuantity()
1.3: getPricingDetails
1.4: calcBasePrice()1.5: calcDiscount() 1.5.1: getDiscountInfo()
![Page 49: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/49.jpg)
Session 3 - Exception-Handling Java Programming
4949TCS Confidential
Activity DiagramNormally used to explain complex processesRepresent different activities and transition between themAn Activity is a state with an internal action and one or more outgoing transitionIt may or may not correspond with methods of classes
18
![Page 50: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/50.jpg)
Slide 49
18 If an activity has more than one outgoing transaction then these must be indentified through condition.152481, 11/15/2006
![Page 51: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/51.jpg)
Session 3 - Exception-Handling Java Programming
5050TCS Confidential
Activity Diagram ComponentsStart: Where the flow of control starts
Activity : Action state
Transition : Movement between activities
End: Where the flow of control ends
![Page 52: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/52.jpg)
Session 3 - Exception-Handling Java Programming
5151TCS Confidential
Fork: A single flow of control split into two or more concurrent flows of control
Allow parallel threads of activitiesOne input, 2 or more output
Activity Diagram Components
![Page 53: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/53.jpg)
Session 3 - Exception-Handling Java Programming
5252TCS Confidential
Activity Diagram (Fork)
Received Order
Verify ordered product are in
stock
Verify customer has available
credit
![Page 54: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/54.jpg)
Session 3 - Exception-Handling Java Programming
5353TCS Confidential
Join has two or more input transition and a single output transition.
Concurrent flow wait until all the incoming flow have reached to join2 or more input, One output
Activity Diagram Components
![Page 55: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/55.jpg)
Session 3 - Exception-Handling Java Programming
5454TCS Confidential
Activity Diagram (Join)
Accept Order
Verify ordered product are in
stock
Verify customer has available
credit
![Page 56: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/56.jpg)
Session 3 - Exception-Handling Java Programming
5555TCS Confidential
Activity Diagram - Registration Process
[Registration time period expired]
Create Curriculum
Close Registration
Open Registration
Mail catalog to Students
Place catalog in Bookstore
Select courses to teach
Create catalog
![Page 57: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/57.jpg)
Session 3 - Exception-Handling Java Programming
5656TCS Confidential
Activity DiagramSwim lane enables you to
group activities based on who is performing themEmphasize on who is going to
perform what
![Page 58: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/58.jpg)
Session 3 - Exception-Handling Java Programming
5757TCS Confidential
Registrar ProfessorCreate Curriculum
Close Registration
Open Registration
Mail catalog to Students
Place catalog in Bookstore
Select courses to teach
Create catalog
![Page 59: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/59.jpg)
Session 3 - Exception-Handling Java Programming
5858TCS Confidential
State Chart DiagramShows how the state of an object changes in its lifetime.Normally used for objects having lots of dynamic behaviore.g. Object like button having ON and OFF state doesn’t required State chart diagram.
![Page 60: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/60.jpg)
Session 3 - Exception-Handling Java Programming
5959TCS Confidential
State Chart Diagram ComponentsInitial state: represented as filled circleState : represented by a
rectangle with rounded cornerTransition :event [guard]/actionGuard : is a Boolean logical conditionFinal state: represented by a filled circle inside a larger circle.
[ ]
[guard] event
![Page 61: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/61.jpg)
Session 3 - Exception-Handling Java Programming
6060TCS Confidential
Unprocessed order
Accept order
Fulfilled order
Reject Order
Pending order
[reject] checked [accept] checked
[some items not available] processed
[all items available]processed/deliver
[all itemsavailable]new supply
State Chart Diagram
![Page 62: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/62.jpg)
Session 3 - Exception-Handling Java Programming
6161TCS Confidential
UML – Implementation View
Component Diagram
![Page 63: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/63.jpg)
Session 3 - Exception-Handling Java Programming
6262TCS Confidential
Component DiagramDescribes high-level reusable parts of a system that helps
Developer / Analyst in understanding the systemServes as input to deployment
diagram
![Page 64: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/64.jpg)
Session 3 - Exception-Handling Java Programming
6363TCS Confidential
Component DiagramIn a class diagram the implementation of the classes is source code. Component diagrams representsexecutable code
![Page 65: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/65.jpg)
Session 3 - Exception-Handling Java Programming
6464TCS Confidential
Component Diagram ComponentsProvided Interfaces : (lollipop notation )Required Interfaces : (Socket notation )Ports : Distinct interaction point
![Page 66: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/66.jpg)
Session 3 - Exception-Handling Java Programming65TCS Confidential
Component Diagram
Provided Interface
Required Interface
![Page 67: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/67.jpg)
Session 3 - Exception-Handling Java Programming
6666TCS Confidential
UML - Environmental View
Deployment Diagram
![Page 68: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/68.jpg)
Session 3 - Exception-Handling Java Programming
6767TCS Confidential
Deployment DiagramHelps in visualizing which components are running on which processors
![Page 69: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/69.jpg)
Session 3 - Exception-Handling Java Programming
6868TCS Confidential
Deployment Diagram
![Page 70: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/70.jpg)
Session 3 - Exception-Handling Java Programming
6969TCS Confidential
Fitting the UML into SDLCRequirements Analysis (what users want the system to do)
Use Case (‘interaction between processes and external entities’)Class [Conceptual] (‘identification of the domain entities’)Activity (‘explanation of process flow’)
110
![Page 71: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/71.jpg)
Slide 69
110 Activity Daigram:Optional, For Coplex Business process it is used to get clear idea with graphical represantation along with the owner of the processes.152481, 11/15/2006
![Page 72: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/72.jpg)
Session 3 - Exception-Handling Java Programming
7070TCS Confidential
Fitting the UML into SDLCDesign (How system implements requirements)
Class [Software] (‘how classes interrelate’)Sequence (‘how objects
interacts)Component (‘grouping of related
components’)
![Page 73: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/73.jpg)
Session 3 - Exception-Handling Java Programming
7171TCS Confidential
Fitting the UML into SDLCState (for objects with complex
life cycle)e.g. Order states like unprocessed, accepted, pending, rejected, fulfilled.Deployment (‘physical layout of
the software’)
![Page 74: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/74.jpg)
Session 3 - Exception-Handling Java Programming
7272TCS Confidential
Fitting the UML into SDLC
DocumentationTo illustrate UML diagrams,
write additional documentatione.g. (“screen flow diagram”“decision table”)
![Page 75: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/75.jpg)
Session 3 - Exception-Handling Java Programming
7373TCS Confidential
Decision tableHelps us in putting complex if-else conditions in simple tabular mannerTwo types of decision table
Binary ValuedMulti Valued
![Page 76: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/76.jpg)
Session 3 - Exception-Handling Java Programming
7474TCS Confidential
Rules for electricity billing Graphical RepresentationIf the meter reading is "OK", calculate on consumption basis (i.e. meter reading)If the meter reading appears "LOW", then check if the house is occupied.
![Page 77: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/77.jpg)
Session 3 - Exception-Handling Java Programming
7575TCS Confidential
Rules for electricity billing If the house is occupied, calculate on seasonal consumption basis otherwise calculate on consumption basis.If the meter is damaged, calculate based on maximum possible electricity usage
![Page 78: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/78.jpg)
Session 3 - Exception-Handling Java Programming
7676TCS Confidential
DECISION TABLE(BINARY-VALUED )
Y N N N Double special rate
N Y N N Double minimum rate
N N Y N Special rate
N N N Y Minimum rate
N Y N Y Consumption < 300 units per month
N N Y Y Domestic Customer
![Page 79: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/79.jpg)
Session 3 - Exception-Handling Java Programming
7777TCS Confidential
DECISION TABLE(MULTI-VALUED )
2S2MSMRate≥ 300< 300 ≥ 300< 300 Consumption
NNDDCustomer
• D: Domestic• N: Non–Domestic• M: Minimum
• S: Special• 2M: Twice Minimum• 2S: Twice Special
![Page 80: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/80.jpg)
Session 3 - Exception-Handling Java Programming
7878TCS Confidential
Rules for electricity billing binary-value decision tables can grow large if the number of rules increase Multi-valued decision tables have an edge In the above example, if we add a new class of customers, called Academic, with the rules
![Page 81: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/81.jpg)
Session 3 - Exception-Handling Java Programming
7979TCS Confidential
BINARY-VALUED DECISION TABLEThree rows and two columns are added to deal with the extra class of customers
![Page 82: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/82.jpg)
Session 3 - Exception-Handling Java Programming
8080TCS Confidential
DECISION TABLE(BINARY-VALUED )
NNNNYNN
YN
NNNYNNY
NN
YNNNTwice concessional rateNYNNConcessional rate NNYNTwice special rate NNNNTwice minimum rate NYNNSpecial rate NNNYMinimum rate NYNY
Consumption < 300 units per month
NNNYDomestic Customer YYNNAcademic
![Page 83: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/83.jpg)
Session 3 - Exception-Handling Java Programming
8181TCS Confidential
MULTI-VALUED DECISION TABLEOnly two columns are added to deal with the extra class of customers
![Page 84: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/84.jpg)
Session 3 - Exception-Handling Java Programming
8282TCS Confidential
DECISION TABLE(MULTI-VALUED )
TS≥ 300
M<300
CTCTMSRate<300≥ 300 <300≥ 300 Consumption
Academic Non-domesticDomesticCustomer
S : SpecialM : MinimumTS : Twice SpecialTM : Twice MinimumTC : Twice ConcessionalC : Concessional
![Page 85: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/85.jpg)
Session 3 - Exception-Handling Java Programming
8383TCS Confidential
UML - ToolsRational SuitArgoUMLPoseidon for UMLEclipse with UML plug-inNetBeans Enterprise Pack
![Page 86: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/86.jpg)
Session 3 - Exception-Handling Java Programming
8484TCS Confidential
Thank You!
![Page 87: Unified Modeling Language (UML) - Gujarat Informatics Limited](https://reader031.vdocuments.mx/reader031/viewer/2022021211/6206540f8c2f7b173006b64c/html5/thumbnails/87.jpg)
Session 3 - Exception-Handling Java Programming
8585TCS Confidential
Question & Answer