LARMAN CD MODULES

Module 1

Examples

Introduction

In this module, we take a quick overview example of a number of major steps in object oriented analysis and design - kind of like a birds-eye view of what will be looked at in more detail later on.

Requirements - the Use Case Model

Writing use cases is a popular and modern way of looking at the requirements for a software system. In the following example we look at a simple use case for "playing a game".

Use Case: Play Dice Game

Main Success Scenario:

1. Player picks up dice and rolls them

2.If face value is 7, then ....

3. .....

Use Cases are a way of describing the functional requirements through telling stories of using the system. They are essentially written as scenarios of the system being used.

Object Analysis - Creating the Domain Model

Creating the Domain Model is a step in Object Analysis where we are trying to answer the question: What are the big ideas, the big concepts, the major points of vocabulary in a domain? We can say that a Domain Model is a Visual Dictionary of the domain.

The following is the Domain Model of our game as a visual dictionary. Note that we can show associations between our domain concepts.

Dynamic Design Model - the Interaction Diagram

The following is an example of a UML Sequence Diagram showing the interaction between objects in terms of the messages and collaborations in order to fulfill the requirements. We are seeing a software class called "Dice Game" and we are sending a message to it called "play" etc. This is a diagram which emphasises the dynamics of the design.

Static Design Model -Class Diagrams

In contrast to Sequence Diagrams, this diagram shows more statically the definition of the software classes. It shows their major attributes and methods.

Object Oriented Program - map design to code

In this diagram we are looking at a Java definition of a dice game. We can see that it maps to the design object's attributes and methods. Note that the OO Code maps fairly closely to the design artifacts. The mapping from diagram to code looks neat and simple here, but in reality, we need to do the diagrams in a lightweight way which capture the big ideas. Consider the diagrams as a starting point for programming.

Artifact Influence

Textual Use Case Model influences the visual Domain Mode. Then these influence the the creation of a Design Model. Which in turn, influences the creation of code.

Home

Module 1 | Module 5 | Module 6 | Module 7 | Module 8 | Module 9

Module 10 | Module 12 | Module 13 | Module 14