object oriented programming and data abstraction earl huff rowan university
DESCRIPTION
A conceptual model is a model which is made up of concepts and their relationships. The first step before drawing a UML diagram. Helps to understand the entities in the real world and how they interact with one another Three major elements of a conceptual model Building blocks Rules for connecting the building blocks Common mechanismsTRANSCRIPT
![Page 1: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/1.jpg)
UML Diagrams
Object Oriented Programming and Data AbstractionEarl HuffRowan University
![Page 2: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/2.jpg)
What is UML?
Stands for Unified Modeling LanguageA standard language for specifying, constructing, and documenting artifacts of software systems.Not a programming language like Java or C++.A general purpose visual modeling language.Can be used to model software and non-software systems.
![Page 3: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/3.jpg)
Conceptual Model of UML
A conceptual model is a model which is made up of concepts and their relationships.
The first step before drawing a UML diagram.Helps to understand the entities in the real world and how they interact with one another
Three major elements of a conceptual modelBuilding blocksRules for connecting the building blocksCommon mechanisms
![Page 4: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/4.jpg)
UML Building Blocks
ThingsRelationshipsDiagrams
![Page 5: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/5.jpg)
Things
Things can beStructural
Static part of the model. Represent physical and conceptual elements.
BehavioralDynamic part of the model.Examples: interaction, state machines
GroupMechanism to group elements together.
AnnotationalCapture remarks, descriptions, and comments.
![Page 6: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/6.jpg)
RelationshipsRelationship shows how elements are associated with each other.Four kinds:
Dependency – change in one element affects the other one.Association – a set of links connecting elements in a model. Describes how many objects are taking part in the relationshipGeneralization – connects a specialized element with a generalized element. Describes inheritance relationship.Realization – two elements are connected in which one element describes some responsibility which is not implemented and the other one implements them (i.e. interfaces).
![Page 7: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/7.jpg)
Relationships
Dependency
Association
Generalization
Realization
![Page 8: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/8.jpg)
DiagramsThe visual output.All the elements and relationships are used to make a complete UML diagram.Diagram types
Class diagramObject diagramUse case diagramSequence diagramCollaboration diagramActivity diagramStatechart diagramDeployment diagramComponent diagram
![Page 9: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/9.jpg)
Class Diagrams
The most common diagram used in UML.Consists of classes, interfaces, associations, and collaboration.Only diagram that can be directly mapped with object oriented languages.Represents a static view of an application.Represent object oriented view of a system.Used as part of Object-Oriented analysis and design.
![Page 10: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/10.jpg)
Class Notations
A typical class diagram is composed of three required sections (optional 4th section)
Top section – contains the name of the class.Second section – shows the attributes of the class.Third section – describes the methods of the class.Fourth section – show any additional components.
![Page 11: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/11.jpg)
Class Notations
Access modifiers+ public- private# protected
Field syntax in UMLVisibility name of field : data type- year : int
![Page 12: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/12.jpg)
Class Notations
Method syntax in UML:Visibility method name(parameter name : data type) : return type+ getInterest(balance:double,rate:double) : double
![Page 13: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/13.jpg)
Class Notations
Example
![Page 14: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/14.jpg)
Class Diagram Example
![Page 15: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/15.jpg)
Object Oriented Analysis and Design
Analysis – investigating the objects.Design – collaboration of identified objects.Purpose
Identification of the objects in a system.Identify the relationshipsCreate a design which can be converted into executables using OO languages.
![Page 16: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/16.jpg)
Object Oriented Analysis and DesignFind the classes
Obtain a written description of the problem domain.Identify all nouns or noun phrases (potential classes).Refine list to include only classes relevant to the problem.
Identify responsibilitiesThings a class is responsible for knowing.Things a class is responsible for doing.Refine list to include only classes relevant to the problem.
![Page 17: Object Oriented Programming and Data Abstraction Earl Huff Rowan University](https://reader036.vdocuments.us/reader036/viewer/2022090107/5a4d1be97f8b9ab0599e3378/html5/thumbnails/17.jpg)
Utilities and Tools
StarUMLhttp://staruml.io/
ArgoUMLhttp://argouml.tigris.org/
NetBeans easyUML pluginhttp://plugins.netbeans.org/plugin/55435/easyuml