UML for Java Programmers

Description

This two-day course is designed as a broad overview of the UML, with specific emphasis on reading the UML notation and accurately translating design into code.  This course is designed for software Implementers, not Designers and Architects.  Therefore, the course is focused on aspects of developing code in strict accordance with the design.  The majority of the course is composed of lectures and exercises in Rational Rose designed to enhance an Implementers understanding of the UML input artifacts from design to construction.

 

Participants will be exposed to all major UML design artifacts, and strategies for code development from each design construct for Java.  Participants will learn how to do code generation, reverse engineering, and roundtrip engineering in Rational Rose for Java.  RUP methods will be referenced for iterative development, stressing the importance of design and code synchronization.

 

This course is in the form of short lectures followed by Lab exercises, which will be completed by teams of 2 people working together. The class and instructor will review lab results. Instructional computers will include Rational Rose.

 

Understanding of the course material will be demonstrated by means of end-of-lesson surveys and Pre/Post Questionnaires for the course.

Overall Course Objective

Upon completion of the course, participants will be able to read and understand UML designs at a sufficient level to develop code in Java.

Course Objectives

·         Describe the UML design artifacts– what they are, when they are produced, by whom, and for what purpose.

·         Describe the purpose of use cases and how they relate to code.

·         Interpret Activity and Use Case Diagrams.

·         Translate the static elements of design into code: Class Diagrams and Specifications

·         Translate the relational elements of design into code: generalization, association, aggregation

·         Differentiate between the data model and the object model

·         Translate the dynamic elements of design into code: Sequence Diagrams, State Diagrams, Collaboration Diagrams

·         Translate the detailed elements of Class Specifications into code: methods, attributes, relationships (types, export control, stereotypes)

·         Synchronize code and design using forward, reverse, and roundtrip engineering

Scope and Intent

The purpose of this course is to interpret UML designs, not to create the designs. Emphasis will be on issues relating to code development from UML to Java.

Audience

This course is intended for Implementers only.

Lesson Course Outline

1.       Introduction to UML

·         Purpose and Background

·         4+1 model architecture review

·         Logical

·         Implementation

·         Process

·         Deployment

·         Use Case

·         RUP Artifact Set

·         RUP Design Package

·         UML References

 

2.       Use Case View: Interpreting Use Case Documents

·         Use Case diagrams

·         Use Case documents

 

3.       Use Case View: Interpreting Use Case Flows

·         Activity diagrams

·         Use Case Realizations

·         Relationships between the parts of the use case view

 

4.       Logical View: UML static models

·         What is a static model?

·         Class Specifications/Diagrams

·         Stereotypes

·         Relationships

·         Association

·         Aggregate

·         Composite

·         Generalization

·         Roles

·         Attributes

·         Operations

·         Method Specification

·         Packages

·         Dependencies

·         Control Units

 

5.       Code Generation

·         Using Rational Rose to generate Java

·         Parts of the model which generate code

·         Forward engineering practices

·         Setting model properties for code generation

·         Creating code for languages which are not object-oriented

 

6.       Reverse Engineering and Roundtrip Engineering with Rational Rose

·         Reverse engineering practices

·         Roundtrip engineering practices

 

7.       Object Models and Data Models

·         Relationship between the models

·         Generating a database schema from a data model in Rational Rose

·         Reverse engineering DDL's in Rational Rose

 

8.       Logical View: UML dynamic models

·         What is a dynamic model?

·         Object models

·         Sequence diagrams

·         Collaboration diagrams

·         State diagrams

 

9.       Implementation View:

·         Component diagrams

·         Expressing the implementation architecture in component diagrams

 

10.   Process View:

·         Component diagrams for process architecture

·         Inter-process communication on sequence diagrams

 

11.   Deployment View: 

·         Deployment diagrams

·         Expressing the physical architecture in deployment diagrams

·         How deployment diagrams influence the code

Duration

8 hours Lecture

8 hours Lab

Prerequisites

Participants must have taken the Rational Rose Fundamentals course.

Source Materials

·         "UML for Java Programmers”, Robert C. Martin, Pearson Education, ISBN 0-13-142848-9

SME / Content Providers

Alex Rush, Geri Schneider Winters

Instructors

Wendy Boggs, Dave Fortescue, Alex Rush, Lauren Thayer, Geri Schneider Winters

 


Lesson 1: Introduction to UML

 

Lesson Description:

This lesson introduces the Unified Modeling Language (UML). It includes the purpose of the UML, how it fits into RUP, and a review of RUP artifacts important to implementers: 4+1 Architecture, Artifacts used and produced by implementers, and the design package.

 

Lesson Objective (overall objective):

Understand what the Unified Modeling Language (UML) is and the relationship between RUP and UML.

 

Enabling Objectives:

·         Describe the purpose and background of UML

·         Describe the parts of the 4+1 architecture

·         List the artifacts that will be used by implementers

·         Describe a Design Package

 

Scope and Intent:

The purpose of this lesson is to give the background and context of the Unified Modeling Language.

 

Outline:

·         Introduction to UML

·         Purpose and Background

·         4+1 Model Architecture review

·         Logical

·         Implementation

·         Process

·         Deployment

·         Use Case

·         RUP Artifact Set

·         RUP Design Package

·         UML References

 

Lab Objectives

No lab for this lesson

 

Estimated Duration

30 minutes Lecture

No lab

 

 


Lesson 2: Use Case View: Interpreting Use Case Documents

 

Lesson Description:

This lesson discusses use cases and the use case view in Rational Rose. It includes descriptions of the use case diagram and use case documents.

 

Lesson Objective (overall objective):

Understand a use case by identifying and interpreting the diagrams and documents that describe a use case.

 

Enabling Objectives:

·         Identify the diagrams and documents that describe a use case

·         Interpret the use case document

·        Interpret the use case diagram

 

Scope and Intent:

The purpose of this lesson is for participants to understand the functionality of a use case by navigating to and interpreting the diagrams and documents that describe a use case. This includes the use case diagram and use case document.

 

Outline:

·         Use Case View: Interpreting Use Case Documents

·         Use Case Diagrams

·         Use Case Documents

 

Lab Objectives

-Description

Use Rational Rose and Microsoft Word to gather information about a use case by navigating to the diagrams and documents that describe the use case.

 

-Objectives

·         Review a Use Case Diagram.

·         Review the Use Case Documents associated with the use cases in the diagram.

·         Describe the functionality of the use cases to the class.

 

Estimated Duration

60 minutes Lecture

30 minutes Lab

 


Lesson 3: Use Case View: Interpreting Use Case Flows

 

Lesson Description:

This lesson continues the discussion of use cases by examining the diagrams that document the flow of a use case. This includes the activity diagram and use case realization. The lesson also discusses the relationship between the various diagrams and documents in the use case view.

 

Lesson Objective (overall objective):

Understand a use case by identifying and interpreting the diagrams and documents that describe a use case.

 

Enabling Objectives:

·         Interpret an activity diagram

·         Interpret a use case realization

·        Describe the relationships between the parts of the use case view

 

Scope and Intent:

The purpose of this lesson is for participants to understand the functionality of a use case by navigating to and interpreting the diagrams and documents that describe a use case flow. This includes the activity diagram and use case realization.

 

Outline:

·         Use Case View: Interpreting Use Case Flows

·         Activity Diagrams

·         Use Case Realizations

·         Relationships between the parts of the use case view

 

Lab Objectives

-Description

Use Rational Rose to gather information about a use case by navigating to the diagrams and documents that describe the use case.

 

-Objectives

·         Review the Activity Diagrams associated with the use cases in the use case diagram.

·         Review the Use Case Realizations associated with the use cases in the use case diagram.

·        Describe the relationships between the parts of the use case view.

 

Estimated Duration

60 minutes Lecture

30 minutes Lab


Lesson 4: Logical View: UML Static Models

 

Lesson Description:

This lesson discusses the logical view in Rational Rose, specifically the static model part of the logical view. This includes specifications for classes, attributes, operations, and relationships, the class diagram, and the package diagram. The lesson also discusses the relationship between the various diagrams in the logical view.

 

Lesson Objective (overall objective):

Understand the classes that will implement a project by identifying and interpreting the diagrams and specifications that describe these classes.

 

Enabling Objectives:

·         Identify the diagrams and documents that describe classes

·         Interpret a class diagram

·         Interpret the class specification

·         Interpret the attribute specification

·         Interpret the operation specification

·         Interpret the relationship specification

·        Interpret the package diagram describing work units

 

Scope and Intent:

The purpose of this lesson is for participants to understand the classes that will implement a project by navigating to and interpreting the diagrams and specifications that describe classes. This includes specifications for classes, attributes, operations, and relationships, the class diagram, and the package diagram.

 

Outline:

·         Logical View: UML Static Models

·         What is a static model?

·         Class Specifications/Diagrams

·         Stereotypes

·         Relationships

·         Association

·         Aggregate

·         Composite

·         Generalization

·         Roles

·         Attributes

·         Operations

·         Method Specification

·         Packages

·         Dependencies

·         Control Units

 

Lab Objectives

-Description

Use Rational Rose to gather information about the classes in a project by navigating to the diagrams and specifications that describe the classes.

 

-Objectives

·         Review a Class Diagram.

·         Browse to a class specification and review that specification.

·         Browse to the attribute specification and review that specification.

·         Browse to the operation specification and review that specification.

·         Browse to the relationship specification and review that specification.

·         Browse to the properties of a class and review those properties.

·         Review a package diagram describing work units

·         Describe the basic class structure to the other participants.

 

Estimated Duration

60 minutes Lecture

60 minutes Lab

 


Lesson 5: Code Generation

 

Lesson Description:

This lesson discusses how to produce code from UML class diagrams. It includes using Rational Rose to generate Java source code and manually creating code for languages such as COBOL and C, which are not object oriented.

 

Lesson Objective (overall objective):

Understand how to produce source code from UML class diagrams for both object-oriented languages and languages that are not object-oriented.

 

Enabling Objectives:

·         Use a UML class diagram and specifications to produce Java source code

·         Use a UML class diagram and specifications to produce COBOL or C source code

 

Scope and Intent:

The purpose of this lesson is for participants to produce code from UML class diagrams.

 

Outline:

·         Code Generation

·         Using Rational Rose to generate Java

·         Parts of the model which generate code

·         Forward engineering practices

·         Setting model properties for code generation

·         Creating code for languages which are not object-oriented

 

Lab Objectives

-Description

Use Rational Rose to produce Java source code from UML class diagrams and manually produce source code for COBOL or C.

 

-Objectives

·         Generate Java source code from a Rational Rose model.

·         Set model properties in Rational Rose and determine how that changes the Java source code that is generated.

·        Manually create source code for COBOL or C from a class diagram in Rational Rose.

 

Estimated Duration

60 minutes Lecture

90 minutes Lab


Lesson 6: Reverse Engineering and Roundtrip Engineering with Rational Rose

 

Lesson Description:

This lesson discusses how to produce a Rational Rose model from source code (reverse engineering) and how to merge source code changes back into a Rational Rose model (roundtrip engineering).

 

Lesson Objective (overall objective):

Understand how to use Rational Rose to reverse engineer and roundtrip engineer source code in order to maintain consistency between the source code and the Rational Rose models.

 

Enabling Objectives:

·         Reverse engineer Java source code into a Rational Rose model

·         Merge reverse engineered code back into the Rational Rose model that created the code.

 

Scope and Intent:

The purpose of this lesson is for participants to be able to maintain consistency between source code and Rational Rose models.

 

Outline:

·         Reverse Engineering and Roundtrip Engineering with Rational Rose

·         Reverse engineering practices

·         Roundtrip engineering practices

 

Lab Objectives

-Description

Reverse engineer and roundtrip engineer Java source code using Rational Rose.

 

-Objectives

·         Reverse engineer Java source code into a Rational Rose model.

·        Merge the reverse engineered code into the Rational Rose model that produced the code originally.

 

Estimated Duration

30 minutes Lecture

30 minutes Lab


Lesson 7: Object Models and Data Models

 

Lesson Description:

This lesson discusses the relationship between object models and data models. It includes generating database schema and reverse engineering DDL’s in Rational Rose.

 

Lesson Objective (overall objective):

Understand the relationship between object models and data models.

 

Enabling Objectives:

·         Understand the difference between a data model and an object model.

·         Use Rational Rose to generate database schema

·        Use Rational Rose to reverse engineer DDL's

 

Scope and Intent:

The purpose of this lesson is for participants to locate and interpret the diagrams that describe the data models. Participants will also understand the relationship between the object model and the data model.

 

Outline:

·         Object Models and Data Models

·         Relationship between the models

·         Generating a database schema from a data model in Rational Rose

·         Reverse engineering DDL's in Rational Rose

 

Lab Objectives

-Description

Use Rational Rose to review a data model, generate schema from the data model, and reverse engineer DDLs into a model.

 

-Objectives

·         Review a data model.

·         Generate a schema from a data model and review it.

·        Reverse engineer a DDL's into a model and review it.

 

Estimated Duration

30 minutes Lecture

30 minutes Lab


Lesson 8: Logical View: UML Dynamic Models

 

Lesson Description:

This lesson discusses the logical view in Rational Rose, specifically the dynamic model part of the logical view. This includes the sequence diagram, collaboration diagram, and state diagram. The lesson also discusses the relationship between the various diagrams in the logical view.

 

Lesson Objective (overall objective):

Understand the dynamic behavior of a project by identifying and interpreting the diagrams that describe the dynamic design.

 

Enabling Objectives:

·         Interpret all parts of a sequence diagram

·         Determine the changes that need to be made to source code based on the information in the sequence diagram.

·         Interpret all parts of a collaboration diagram

·         Determine the changes that need to be made to source code based on the information in the collaboration diagram.

·         Interpret all parts of a state diagram.

·         Determine the changes that need to be made to source code based on the information in the state diagram.

 

Scope and Intent:

The purpose of this lesson is for participants to understand the dynamic behavior of a project by navigating to and interpreting the diagrams that describe the dynamic design. This includes the sequence diagram, collaboration diagram, and state diagram, and how to make changes to the source code based on information in these diagrams.

 

Outline:

·         Logical View:  UML Dynamic Models

·         What is a dynamic model?

·         Object Models

·         Sequence diagrams

·         Collaboration diagrams

·         State diagrams

 

Lab Objectives

-Description

Use Rational Rose to gather information about the dynamic behavior of a project by navigating to the diagrams that describe the dynamic design. Manually modify source code based on the information in the dynamic design.

 

-Objectives

·         Browse to a sequence diagram.

·         Browse from the sequence diagram to a related collaboration diagram.

·         Select an object on the sequence or collaboration diagram and browse to the associated class.

·         Use the sequence diagram to add details to source code generated in previous labs.

·         Browse from a class to a related state diagram.

·         Use the state diagram to add details to source code generated in previous labs.

 

Estimated Duration

60 minutes Lecture

90 minutes Lab


Lesson 9: Implementation View

 

Lesson Description:

This lesson discusses the implementation view in Rational Rose. This includes the component diagram and its relationship to the implementation of a project.

 

Lesson Objective (overall objective):

Understand the structure of a project by identifying and interpreting the diagrams that describe the implementation view.

 

Enabling Objectives:

·         Interpret all parts of a component diagram

·         Identify the changes that need to be made to source code based on the information in the component diagram

 

Scope and Intent:

The purpose of this lesson is for participants to understand the structure of a project by navigating to and interpreting the diagrams that describe the implementation view. This includes the component diagram and how to make changes to the source code based on information in this diagram.

 

Outline:

·         Implementation View

·         Component diagrams

·         Expressing the implementation architecture in component diagrams

 

Lab Objectives

-Description

Use Rational Rose to gather information about the structure of a project by navigating to the diagrams that describe the implementation view. Manually modify source code based on the information in the implementation view.

 

-Objectives

·         Browse to the implementation view in a component diagram.

·         Use Rational Rose to generate code from the implementation view.

·        Review the resulting directory and file structures.

 

Estimated Duration

30 minutes Lecture

30 minutes Lab


Lesson 10: Process View

 

Lesson Description:

This lesson discusses the process view in Rational Rose. This includes the component diagram and its relationship to the process architecture and implementation.

 

Lesson Objective (overall objective):

Understand the process architecture of a project by identifying and interpreting the diagrams that describe the process view.

 

Enabling Objectives:

·         Interpret all parts of a component diagram

·         Interpret inter-process communication in sequence diagrams

·        Identify the changes that need to be made to source code based on the information in the component and sequence diagrams

 

Scope and Intent:

The purpose of this lesson is for participants to understand the process architecture of a project by navigating to and interpreting the diagrams that describe the process view. This includes the component diagram, the sequence diagram, and how to make changes to the source code based on information in these diagrams.

 

Outline:

·         Process View

·         Component diagrams

·         Inter-process communication on sequence diagrams

 

Lab Objectives

-Description

Use Rational Rose to gather information about the process architecture of a project by navigating to the diagrams that describe the process view. Manually modify source code based on the information in the process view.

 

-Objectives

·         Browse to the process view in a component diagram.

·         Browse to the sequence diagram that describes inter-process communication.

·        Use these diagrams to add details to source code generated in previous labs.

 

Estimated Duration

30 minutes Lecture

60 minutes Lab


Lesson 11: Deployment View

 

Lesson Description:

This lesson discusses the deployment view in Rational Rose. This includes the deployment diagram and its relationship to the architecture and implementation of a project.

 

Lesson Objective (overall objective):

Understand the physical structure of a project by identifying and interpreting the diagrams that describe the deployment view.

 

Enabling Objectives:

·         Interpret all parts of a deployment diagram

·        Identify the changes that need to be made to source code based on the information in the deployment diagram

 

Scope and Intent:

The purpose of this lesson is for participants to understand the physical structure of a project by navigating to and interpreting the diagrams that describe the deployment view. This includes the deployment diagram and how to make changes to the source code based on information in this diagram.

 

Outline:

·         Deployment View

·         Deployment diagrams

·         Expressing the physical architecture in deployment diagrams

·         How deployment diagrams influence the code

 

Lab Objectives

-Description

Use Rational Rose to gather information about the physical structure of a project by navigating to the diagrams that describe the deployment view. Manually modify source code based on the information in the deployment view.

 

-Objectives

·         Browse to a Deployment Diagram.

·         Use the deployment diagram to add details to source code generated in the previous lab.

 

Estimated Duration

30 minutes Lecture

30 minutes Lab