Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Programming and Data Abstraction Earl Huff Rowan University.

Similar presentations


Presentation on theme: "Object Oriented Programming and Data Abstraction Earl Huff Rowan University."— Presentation transcript:

1 Object Oriented Programming and Data Abstraction Earl Huff Rowan University

2 Stands for Unified Modeling Language A 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.

3 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 mechanisms

4 Things Relationships Diagrams

5 Things can be Structural Static part of the model. Represent physical and conceptual elements. Behavioral Dynamic part of the model. Examples: interaction, state machines Group Mechanism to group elements together. Annotational Capture remarks, descriptions, and comments.

6 Relationship 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 relationship Generalization – 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).

7 Dependency Association Generalization Realization

8 The visual output. All the elements and relationships are used to make a complete UML diagram. Diagram types Class diagram Object diagram Use case diagram Sequence diagram Collaboration diagram Activity diagram Statechart diagram Deployment diagram Component diagram

9 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.

10 A typical class diagram is composed of three required sections (optional 4 th 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.

11 Access modifiers +  public -  private #  protected Field syntax in UML Visibility name of field : data type - year : int

12 Method syntax in UML: Visibility method name(parameter name : data type) : return type + getInterest(balance:double,rate:double) : double

13 Example

14

15 Analysis – investigating the objects. Design – collaboration of identified objects. Purpose Identification of the objects in a system. Identify the relationships Create a design which can be converted into executables using OO languages.

16 Find 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 responsibilities Things a class is responsible for knowing. Things a class is responsible for doing. Refine list to include only classes relevant to the problem.

17 StarUML http://staruml.io/ ArgoUML http://argouml.tigris.org/ NetBeans easyUML plugin http://plugins.netbeans.org/plugin/55435/easyuml


Download ppt "Object Oriented Programming and Data Abstraction Earl Huff Rowan University."

Similar presentations


Ads by Google