SlideShare une entreprise Scribd logo
1  sur  24
Object-Oriented Analysis and Design Using UML
Objectives


                In this session, you will learn to:
                   Apply the basic concepts of static modeling
                   Create class and object diagrams




     Ver. 1.0                                                    Slide 1 of 24
Object-Oriented Analysis and Design Using UML
Applying the Basic Concepts of Static Modeling


                • In static modeling, you create:
                      Class diagrams to represent classes, interfaces, collaborations,
                      and their relationships.
                      Object diagrams to represent the values of attributes for a
                      specific instance of a class and the relationship among objects.




     Ver. 1.0                                                                Slide 2 of 24
Object-Oriented Analysis and Design Using UML
Identifying Classes and Objects


                You can derive classes and objects:
                   From use cases of the software system.
                   From responsibilities of the software system.
                   By selecting all the nouns and noun phrases from the
                   statements of the SRS document.




     Ver. 1.0                                                             Slide 3 of 24
Object-Oriented Analysis and Design Using UML
Identifying Classes and Objects (Contd.)


                Consider the following use cases for the customer
                information system for the BlueSeas group:
                – Save Customer Information: Stores the information about
                  customers, such as name, address, and contact number.
                – Save Product Details: Stores the information about the
                  product.
                – Save Purchase Details: Stores the information about the
                  purchase.
                – Calculate Purchase Amount: Calculates the total cost of
                  products purchased by a customer.
                – Select Discount: Selects the discount to be offered based on
                  the total cost of products purchased by the customer.
                – Calculate Payable Amount: Deducts the discount from the
                  total cost to obtain the amount payable by the customer.



     Ver. 1.0                                                          Slide 4 of 24
Object-Oriented Analysis and Design Using UML
Identifying Classes and Objects (Contd.)


                – Generate Bill: Generates a receipt for the amount payable by
                  the customer.
                – Accept Payment: Provides an interface on multiple counters
                  to accept payment from customers.
                Based on these use cases following classes can be
                identified:
                – Customer: Maintains customer information.
                – Product: Maintains the information about the product.
                – PurchaseDetail: Maintains the information about the purchase
                  and calculates the total amount of purchase.
                – Discount: Selects the discount to be offered to a customer.
                – Bill: Calculates the payable amount and, then, generates a bill
                  for the customer.
                – PaymentCounter: Defines the operations to calculate the
                  payable amount and generate the bill to collect payment from
                  the customer.
     Ver. 1.0                                                            Slide 5 of 24
Object-Oriented Analysis and Design Using UML
Creating Class and Object Diagrams


                Static Modeling technique is used to depict the static
                constituents of a software system.
                Class diagrams and Object diagrams are the Static
                Structure Models that are required to represent the static
                constituents of a software system.
                Class diagrams are used to represent the classes, attributes
                and the relationship between these classes whereas Object
                diagrams are used to represent the instance of these static
                constituents.




     Ver. 1.0                                                       Slide 6 of 24
Object-Oriented Analysis and Design Using UML
Introducing Class Diagrams


                UML provides a class notation to represent classes in class
                diagrams.
                The class notation has three compartments:
                   The first compartment depicts the name of the class.
                   The second compartment depicts the attributes of the class.
                   The third compartment depicts the operations of the class.




     Ver. 1.0                                                            Slide 7 of 24
Object-Oriented Analysis and Design Using UML
Introducing Class Diagrams (Contd.)


                The attributes of a class can also be depicted as an
                association.




     Ver. 1.0                                                          Slide 8 of 24
Object-Oriented Analysis and Design Using UML
Introducing Class Diagrams (Contd.)


                You can use class notation to:
                    Analyze the requirements of the system. At the analysis level,
                    the class notation depicts only the attributes and operations.
                    Implement the requirements of the system at the
                    implementation phase. At the implementation level, the class
                    notation depicts attributes, operations, and their visibility.
                Visibilities for attributes and operations of a class are:
                 – + : Indicates that the attribute or operation is visible to other
                   classes.
                 – - : Indicates that the attribute or operation is not visible to other
                   classes.
                 – # : Indicates that the attribute or operation in the base class is
                   visible to derived classes.
                 – ~: Indicates that the attribute or operation is visible to classes,
                   which are within the same package.

     Ver. 1.0                                                                  Slide 9 of 24
Object-Oriented Analysis and Design Using UML
Introducing Class Diagrams (Contd.)


                • Syntax for Attributes:
                      Syntax for depicting an attribute in a class diagram:
                      visibility name: type multiplicity =
                      default (property–string)
                    – Example:




     Ver. 1.0                                                                 Slide 10 of 24
Object-Oriented Analysis and Design Using UML
Introducing Class Diagrams (Contd.)


                  Syntax for Operations:
                       Syntax for representing operations in a class diagrams:
                       visibility name (parameter-list):
                       return-type (property-string)
                    – Example of a class:
                                                 Data Type                    Property String

                             Name of Attribute                    Default Value
                                                      Multiplicity

                                                       PurchaseDetails

                                 -purchaseDate: Date [1…*] = "01-01-2000" {ReadOnly}
                Visibility
                                 -productID:Int[1…*]
                                 -custID:Int[1]
                                 -quantity:Int[1…*]=0

                Visibility       +caluculateTotalAmt():Float
                                 +generatePurchaseList(prodID:Int): String


                                                                Data Type

                             Name of Operation      Name of Parameter       Return Type

     Ver. 1.0                                                                                   Slide 11 of 24
Object-Oriented Analysis and Design Using UML
Just a minute


                Which of the following visibilities provided by UML indicates
                that the attribute/operation in the base class are protected?
                 1.   +
                 2.   -
                 3.   #
                 4.   ~




                Answer:
                      #


     Ver. 1.0                                                         Slide 12 of 24
Object-Oriented Analysis and Design Using UML
Introducing Object Diagrams


                Object diagrams represent the instances of static elements,
                that is, classes.
                Object diagram is represented as a rectangular box with two
                compartments.


                                custObj : Customer
                             custName = John
                             custPhnum = 3427 8639




     Ver. 1.0                                                      Slide 13 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams


                Relationships indicate the way in which the elements of a
                software system connect to each other logically and
                physically.
                The various relationships between classes and objects are:
                   Association
                   Dependency
                   Generalization
                   Realization




     Ver. 1.0                                                      Slide 14 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                Association relationship:
                   Represents the static relationship shared among objects of two
                   classes.




                                                 Has
                           Customer                         Address




                 – An attribute of the association relationship is multiplicity.
                 – Multiplicity represents the number of objects of a class that are
                   connected to an object of another class.




     Ver. 1.0                                                              Slide 15 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                The four types of multiplicity relationships are:
                 – Exactly one (1): Specifies that only one object of a class is related
                   to object/s of another class.
                 – One or zero (0..1): Specifies that zero or one object of a class is
                   related to object/s of another class.
                 – Many (0..*): Specifies that zero or many objects of a class are
                   related to object/s of another class.
                 – One or more (1..*): Specifies that one or many objects of a class
                   are related to object/s of another class.




     Ver. 1.0                                                                 Slide 16 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                Association relationship is of two types:
                 – Aggregation: Represents an association between two classes
                   such that class A is a part of class B and class A can exist
                   independently.




                 – Composition: Represents an association between two classes
                   such that class A contains class B and also controls the lifetime of
                   class B.




     Ver. 1.0                                                                 Slide 17 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                Dependency relationship:
                   Represents the semantic relationship between two classes
                   such that a change in the attributes and operations of one
                   class affects the attributes and operations of the other class.




     Ver. 1.0                                                               Slide 18 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                Generalization relationship:
                   Represents how super classes are related to the sub classes.




     Ver. 1.0                                                           Slide 19 of 24
Object-Oriented Analysis and Design Using UML
Representing Relationships in Class and Object Diagrams (Contd.)


                Realization relationship:
                   Represents the semantic relationship among the components
                   of a class diagram, where one component specifies a contract
                   and the other component implements the contract.




     Ver. 1.0                                                           Slide 20 of 24
Object-Oriented Analysis and Design Using UML
Just a minute


                Which of the following represents the semantic relationship
                between two classes such that a change in the attributes
                and operations of one class affects the attributes and
                operations of the other class?
                 1.   Generalization
                 2.   Dependency
                 3.   Realization
                 4.   Aggregation




                Answer:
                      Dependency


     Ver. 1.0                                                       Slide 21 of 24
Object-Oriented Analysis and Design Using UML
Depicting a Class Diagram for the Customer Information System


                Consider the following class diagram that depicts the
                relationship among classes for the customer information
                system:




                              Class Daigram
                        Depicting the Relationships




     Ver. 1.0                                                      Slide 22 of 24
Object-Oriented Analysis and Design Using UML
Summary


               In this session, you learned that:
                  Static modeling involves identifying the static elements and
                  their relationships to depict the static structure of the software
                  system.
                  The class and object diagrams are created to model the static
                  structure of a software system.
                  The class diagram notation represents the name, attributes,
                  and operations of a class.
                  The instances of the class diagram elements and their
                  relationships need to be identified in order to create object
                  diagrams. Instances refer to the objects of the software
                  system.
                  The object diagram notation represents the name and
                  attributes of the object. It also includes the name of the class
                  and the values of the attributes for a specific instance.


    Ver. 1.0                                                                Slide 23 of 24
Object-Oriented Analysis and Design Using UML
Summary (Contd.)


               The various types of relationships shared by objects and
               classes are:
                   Association
                   Dependency
                   Generalization
                   Realization




    Ver. 1.0                                                         Slide 24 of 24

Contenu connexe

Tendances

12 ooad uml-16
12 ooad uml-1612 ooad uml-16
12 ooad uml-16Niit Care
 
13 ooad uml-17
13 ooad uml-1713 ooad uml-17
13 ooad uml-17Niit Care
 
11 ooad uml-14
11 ooad uml-1411 ooad uml-14
11 ooad uml-14Niit Care
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworkskim.mens
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and designnaveed428
 
Arch06 1
Arch06 1Arch06 1
Arch06 1nazn
 
Object oriented methodology & unified modeling language
Object oriented methodology & unified modeling languageObject oriented methodology & unified modeling language
Object oriented methodology & unified modeling languageIsmail El Gayar
 
08 ooad uml-10
08 ooad uml-1008 ooad uml-10
08 ooad uml-10Niit Care
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD pptPRIANKA R
 
OO Development 3 - Models And UML
OO Development 3 - Models And UMLOO Development 3 - Models And UML
OO Development 3 - Models And UMLRandy Connolly
 
Lab # 06
Lab # 06Lab # 06
Lab # 06Mr SMAK
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsMohammed Misbhauddin
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IIpkaviya
 
Uml Explained Step ByStep
Uml Explained Step ByStepUml Explained Step ByStep
Uml Explained Step ByStepWaseem Khan
 

Tendances (19)

12 ooad uml-16
12 ooad uml-1612 ooad uml-16
12 ooad uml-16
 
13 ooad uml-17
13 ooad uml-1713 ooad uml-17
13 ooad uml-17
 
11 ooad uml-14
11 ooad uml-1411 ooad uml-14
11 ooad uml-14
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and design
 
Arch06 1
Arch06 1Arch06 1
Arch06 1
 
Object oriented methodology & unified modeling language
Object oriented methodology & unified modeling languageObject oriented methodology & unified modeling language
Object oriented methodology & unified modeling language
 
08 ooad uml-10
08 ooad uml-1008 ooad uml-10
08 ooad uml-10
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD ppt
 
OO Development 3 - Models And UML
OO Development 3 - Models And UMLOO Development 3 - Models And UML
OO Development 3 - Models And UML
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Lab # 06
Lab # 06Lab # 06
Lab # 06
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
Uml
UmlUml
Uml
 
Uml Explained Step ByStep
Uml Explained Step ByStepUml Explained Step ByStep
Uml Explained Step ByStep
 
Seng 123 8-ooad
Seng 123 8-ooadSeng 123 8-ooad
Seng 123 8-ooad
 
Uml2
Uml2Uml2
Uml2
 

Similaire à Object-Oriented Analysis and Design Using UML

UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTleela rani
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxraghavanp4
 
10 ooad uml-13
10 ooad uml-1310 ooad uml-13
10 ooad uml-13Niit Care
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT Ipkaviya
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - AnalysisRandy Connolly
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modelingAnanthiP8
 
Class diagram java
Class diagram javaClass diagram java
Class diagram javaravinlaheri2
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2Sisir Ghosh
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 

Similaire à Object-Oriented Analysis and Design Using UML (20)

OOAD
OOADOOAD
OOAD
 
Uml3
Uml3Uml3
Uml3
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
Ooad unit 1
Ooad unit 1Ooad unit 1
Ooad unit 1
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptx
 
10 ooad uml-13
10 ooad uml-1310 ooad uml-13
10 ooad uml-13
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - Analysis
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modeling
 
Class diagram java
Class diagram javaClass diagram java
Class diagram java
 
UML
UMLUML
UML
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Elaboration
ElaborationElaboration
Elaboration
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
 
ITSE_10(UML,OO).pptx
ITSE_10(UML,OO).pptxITSE_10(UML,OO).pptx
ITSE_10(UML,OO).pptx
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 

Plus de Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Dernier

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Object-Oriented Analysis and Design Using UML

  • 1. Object-Oriented Analysis and Design Using UML Objectives In this session, you will learn to: Apply the basic concepts of static modeling Create class and object diagrams Ver. 1.0 Slide 1 of 24
  • 2. Object-Oriented Analysis and Design Using UML Applying the Basic Concepts of Static Modeling • In static modeling, you create: Class diagrams to represent classes, interfaces, collaborations, and their relationships. Object diagrams to represent the values of attributes for a specific instance of a class and the relationship among objects. Ver. 1.0 Slide 2 of 24
  • 3. Object-Oriented Analysis and Design Using UML Identifying Classes and Objects You can derive classes and objects: From use cases of the software system. From responsibilities of the software system. By selecting all the nouns and noun phrases from the statements of the SRS document. Ver. 1.0 Slide 3 of 24
  • 4. Object-Oriented Analysis and Design Using UML Identifying Classes and Objects (Contd.) Consider the following use cases for the customer information system for the BlueSeas group: – Save Customer Information: Stores the information about customers, such as name, address, and contact number. – Save Product Details: Stores the information about the product. – Save Purchase Details: Stores the information about the purchase. – Calculate Purchase Amount: Calculates the total cost of products purchased by a customer. – Select Discount: Selects the discount to be offered based on the total cost of products purchased by the customer. – Calculate Payable Amount: Deducts the discount from the total cost to obtain the amount payable by the customer. Ver. 1.0 Slide 4 of 24
  • 5. Object-Oriented Analysis and Design Using UML Identifying Classes and Objects (Contd.) – Generate Bill: Generates a receipt for the amount payable by the customer. – Accept Payment: Provides an interface on multiple counters to accept payment from customers. Based on these use cases following classes can be identified: – Customer: Maintains customer information. – Product: Maintains the information about the product. – PurchaseDetail: Maintains the information about the purchase and calculates the total amount of purchase. – Discount: Selects the discount to be offered to a customer. – Bill: Calculates the payable amount and, then, generates a bill for the customer. – PaymentCounter: Defines the operations to calculate the payable amount and generate the bill to collect payment from the customer. Ver. 1.0 Slide 5 of 24
  • 6. Object-Oriented Analysis and Design Using UML Creating Class and Object Diagrams Static Modeling technique is used to depict the static constituents of a software system. Class diagrams and Object diagrams are the Static Structure Models that are required to represent the static constituents of a software system. Class diagrams are used to represent the classes, attributes and the relationship between these classes whereas Object diagrams are used to represent the instance of these static constituents. Ver. 1.0 Slide 6 of 24
  • 7. Object-Oriented Analysis and Design Using UML Introducing Class Diagrams UML provides a class notation to represent classes in class diagrams. The class notation has three compartments: The first compartment depicts the name of the class. The second compartment depicts the attributes of the class. The third compartment depicts the operations of the class. Ver. 1.0 Slide 7 of 24
  • 8. Object-Oriented Analysis and Design Using UML Introducing Class Diagrams (Contd.) The attributes of a class can also be depicted as an association. Ver. 1.0 Slide 8 of 24
  • 9. Object-Oriented Analysis and Design Using UML Introducing Class Diagrams (Contd.) You can use class notation to: Analyze the requirements of the system. At the analysis level, the class notation depicts only the attributes and operations. Implement the requirements of the system at the implementation phase. At the implementation level, the class notation depicts attributes, operations, and their visibility. Visibilities for attributes and operations of a class are: – + : Indicates that the attribute or operation is visible to other classes. – - : Indicates that the attribute or operation is not visible to other classes. – # : Indicates that the attribute or operation in the base class is visible to derived classes. – ~: Indicates that the attribute or operation is visible to classes, which are within the same package. Ver. 1.0 Slide 9 of 24
  • 10. Object-Oriented Analysis and Design Using UML Introducing Class Diagrams (Contd.) • Syntax for Attributes: Syntax for depicting an attribute in a class diagram: visibility name: type multiplicity = default (property–string) – Example: Ver. 1.0 Slide 10 of 24
  • 11. Object-Oriented Analysis and Design Using UML Introducing Class Diagrams (Contd.) Syntax for Operations: Syntax for representing operations in a class diagrams: visibility name (parameter-list): return-type (property-string) – Example of a class: Data Type Property String Name of Attribute Default Value Multiplicity PurchaseDetails -purchaseDate: Date [1…*] = "01-01-2000" {ReadOnly} Visibility -productID:Int[1…*] -custID:Int[1] -quantity:Int[1…*]=0 Visibility +caluculateTotalAmt():Float +generatePurchaseList(prodID:Int): String Data Type Name of Operation Name of Parameter Return Type Ver. 1.0 Slide 11 of 24
  • 12. Object-Oriented Analysis and Design Using UML Just a minute Which of the following visibilities provided by UML indicates that the attribute/operation in the base class are protected? 1. + 2. - 3. # 4. ~ Answer: # Ver. 1.0 Slide 12 of 24
  • 13. Object-Oriented Analysis and Design Using UML Introducing Object Diagrams Object diagrams represent the instances of static elements, that is, classes. Object diagram is represented as a rectangular box with two compartments. custObj : Customer custName = John custPhnum = 3427 8639 Ver. 1.0 Slide 13 of 24
  • 14. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams Relationships indicate the way in which the elements of a software system connect to each other logically and physically. The various relationships between classes and objects are: Association Dependency Generalization Realization Ver. 1.0 Slide 14 of 24
  • 15. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) Association relationship: Represents the static relationship shared among objects of two classes. Has Customer Address – An attribute of the association relationship is multiplicity. – Multiplicity represents the number of objects of a class that are connected to an object of another class. Ver. 1.0 Slide 15 of 24
  • 16. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) The four types of multiplicity relationships are: – Exactly one (1): Specifies that only one object of a class is related to object/s of another class. – One or zero (0..1): Specifies that zero or one object of a class is related to object/s of another class. – Many (0..*): Specifies that zero or many objects of a class are related to object/s of another class. – One or more (1..*): Specifies that one or many objects of a class are related to object/s of another class. Ver. 1.0 Slide 16 of 24
  • 17. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) Association relationship is of two types: – Aggregation: Represents an association between two classes such that class A is a part of class B and class A can exist independently. – Composition: Represents an association between two classes such that class A contains class B and also controls the lifetime of class B. Ver. 1.0 Slide 17 of 24
  • 18. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) Dependency relationship: Represents the semantic relationship between two classes such that a change in the attributes and operations of one class affects the attributes and operations of the other class. Ver. 1.0 Slide 18 of 24
  • 19. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) Generalization relationship: Represents how super classes are related to the sub classes. Ver. 1.0 Slide 19 of 24
  • 20. Object-Oriented Analysis and Design Using UML Representing Relationships in Class and Object Diagrams (Contd.) Realization relationship: Represents the semantic relationship among the components of a class diagram, where one component specifies a contract and the other component implements the contract. Ver. 1.0 Slide 20 of 24
  • 21. Object-Oriented Analysis and Design Using UML Just a minute Which of the following represents the semantic relationship between two classes such that a change in the attributes and operations of one class affects the attributes and operations of the other class? 1. Generalization 2. Dependency 3. Realization 4. Aggregation Answer: Dependency Ver. 1.0 Slide 21 of 24
  • 22. Object-Oriented Analysis and Design Using UML Depicting a Class Diagram for the Customer Information System Consider the following class diagram that depicts the relationship among classes for the customer information system: Class Daigram Depicting the Relationships Ver. 1.0 Slide 22 of 24
  • 23. Object-Oriented Analysis and Design Using UML Summary In this session, you learned that: Static modeling involves identifying the static elements and their relationships to depict the static structure of the software system. The class and object diagrams are created to model the static structure of a software system. The class diagram notation represents the name, attributes, and operations of a class. The instances of the class diagram elements and their relationships need to be identified in order to create object diagrams. Instances refer to the objects of the software system. The object diagram notation represents the name and attributes of the object. It also includes the name of the class and the values of the attributes for a specific instance. Ver. 1.0 Slide 23 of 24
  • 24. Object-Oriented Analysis and Design Using UML Summary (Contd.) The various types of relationships shared by objects and classes are: Association Dependency Generalization Realization Ver. 1.0 Slide 24 of 24

Notes de l'éditeur

  1. Initiate the session by explaining the session objectives to the students. Tell the students that before developing a software system, a developer needs to understand its physical structure. The physical structure of a software system consists of classes, objects, interfaces, and their relationships with each other. You can depict the physical structure by using static modeling, which includes class diagrams and object diagrams.
  2. Explain what class diagrams and object diagrams depict. Also explain the case study of BlueSeas group given in the student guide to introduce the need for static modeling. This case study will help you invoke student interest in static modeling.
  3. Explain the different methods of identifying the classes and objects for a given problem statement. Use the BlueSeas Group case study to explain each of these methods.
  4. Explain the use cases given on the slide and the next slide to the students and ask them to identify the classes for the customer information system.
  5. Explain that the following classes can be identified from the information about use cases given here: Customer Product PuchaseDetail Discount Bill PaymentCounter
  6. Explain the concept of Class and Object Diagrams.
  7. Explain the UML notation for a class by using the figure given on the slide.
  8. Use the figure given on the slide to explain that an attribute can be represented as a solid line connecting two classes, where the source class is the class name and the target class is the data type class. The name of the attribute is stated at the target end of the association.
  9. Explain that class diagrams are used for both analysis and implementation. Explain that at the implementation level, visibility of attributes and operations is also specified. Explain the meaning of visibility. Next, explain the symbols used for depicting different types of visibilities. Finally, explain with an example, how the visibility of attributes and operations is specified in a class notation.
  10. Explain the syntax of depicting attributes in a class diagram by using the example given on the slide.
  11. Explain the syntax for representing operations in a class diagram by using the example given on the slide.
  12. Check the learning of the students by asking the question given on the slide.
  13. Explain the structure of an object in an object diagram by using the example given on the slide.
  14. Explain the meaning of relationships between the elements of a software system. Also, list the various types of relationships.
  15. Explain bi-directional and unidirectional association relationship by using the figures given on the slide.
  16. Explain the meaning of multiplicity by using the example given on the slide. Also explain the four types of multiplicity relationships.
  17. Explain aggregation and composition as special types of association relationships. Explain the concept of aggregation and composition by using the figures given on the slide.
  18. Explain dependency and generalization by using the examples given on the slide.
  19. Explain dependency and generalization by using the examples given on the slide.
  20. Explain the concept of realization by using the example given on the slide. When you explain the various types of relationships to students, they may get confused among relationships, such as dependency, generalization, and realization. You should explain the concepts with the help of examples to enable the students to identify the relationships with real-life scenarios. Dependency is defined as a relationship in which a change in an element causes a change in the other elements. By this definition, association, generalization, and realization are also dependencies but these relationships have their own representation and notation. For this reason, these relationships are not considered as dependencies. In an association relationship, a change in the elements of a class causes a change in the elements of the associated classes also. Similarly, in generalization, any change in the attributes and operations of general classes leads to a change in the attributes and operations of special classes. In realization, if the specification of the contract changes, the elements of implementing a class also change.
  21. Check the learning of the students by asking the question given on the slide.
  22. Reiterate the BlueSeas Group case study and explain how the class diagram for that case study can be created by using the class diagram given in the embedded Word document. Students may come across the terms, responsibilities of classes and reference attributes. To explain these terms to students, refer to the following information. Responsibilities of a Class The responsibilities of a class are defined as a set of functions that the class provides. Classes need methods to implement their responsibilities. A class can have the following types of responsibilities: * Doing : Includes the functions that a class performs to initiate a function in other classes. For example, the Customer class requests for a bill. This initiates the generateBill() operation of the Bill class. * Knowing : Includes the functions that the class provides to obtain the value of derived attributes and private encapsulated data. For example, the getCustName() operation of the Customer class is used to obtain the name of the customer when the visibility of the CustName attribute is private. Reference Attribute A reference attribute is an attribute that refers to the object of another class. A reference attribute of a class is not explicitly shown in the design of a class diagram. It is derived from the association relationship shared by the two classes. Consider the example of two classes, SalesList and Product, which share a many to one multiplicity relationship between each other. The Product class stores the description of several products. The SalesList class contains a list of various sold products. The following figure shows the relationship between the SalesList and Product classes and the implementation of the reference attribute in the SalesList class. <<<<<<INSERT FIGURE>>>>>>> Note that in the preceding figure, an instance variable of the Product class has been created in the SalesList class. However, the instance variable is not explicitly declared as an attribute in the attribute section of the SalesList class. A common definition for reference attributes is, “Reference attributes have suggested association and navigability in a class diagram”. Mapping this definition to the class diagram, note that there is a suggested attribute visibility indicated by the association and navigability explicitly defined as an attribute during the code generation phase.
  23. Summarize the session by using the summary points given in the slide.
  24. Summarize the session by using the summary points given in the slide.