Chapter 5

Object-Oriented Analysis and Design

Chapter Overview

This chapter reviews analysis and design concepts and activities for OO development using VB .NET. It begins by discussing object-oriented analysis and object-oriented design, including iterative and incremental approaches to development. This chapter introduces the Unified Modeling Language (UML) to illustrate model-driven development, emphasizing the use case diagram, class diagram, and sequence diagram. It also examines the three-tier design approach to illustrate the transition from OO analysis to OO design. Finally, it introduces the Bradshaw Marina case study, which is used for examples throughout this text.

Objectives

·  Explore OOA and OOD

·  Be able to read and create three Unified Modeling Language (UML) diagrams: use case, class diagram, and sequence diagram

·  Explain three-tier design in OO development

·  Learn about the Bradshaw Marina case study

Key Terms

Ø  abstract class

Ø  active object

Ø  activity diagram

Ø  actor

Ø  association class

Ø  dynamic model

Ø  external event

Ø  incremental development

Ø  lifeline

Ø  logical model

Ø  model

Ø  model-driven development

Ø  physical model

Ø  scenario

Ø  spiral model

Ø  state event

Ø  static model

Ø  system analysis

Ø  system design

Ø  system requirements

Ø  temporal event

Ø  use case

Ø  waterfall method

Explanation of Symbols

è Write a definition, concept or key point following the arrow.

______Fill in blank lines with a word or phrase to complete a definition, concept or key point.

choice1/choice2 Circle one of the choices.

E The pointing finger comes into play when you review your notes. It is a prompt to think of and write your own example(s) of a concept.

Exploring OOA and OOD

System analysis means to study, understand, and define the requirements for the system. System requirements è

These requirements are usually described using ______which depicts some aspect of the real world, in this case some aspect of the required system. Models created during system analysis are often called ______models, while models created during system design are often called ______models.

System design means è

Creating logical models of the system requirements during analysis and then physical models during design is referred to as ______.

Because OO development focuses on classes of objects beginning with analysis, and then continuing through design and programming, it works very well with an ______approach to development. Also used extensively with OO development, ______development means some of the system is completed and put into operation before the entire system is finished. An increasingly popular approach to development is the spiral model which è

Object-oriented development also requires traditional system development tools and techniques, such as: project planning, project management, feasibility assessment, management reviews, user involvement, joint application development, prototyping, unit and system testing, and conversion.

Understanding the Unified Modeling Language

Object-oriented development requires a collection of models that depict system requirements and designs. UML defines a standard set of constructs and diagrams which are used to model OO systems.

Creating and Interpreting the Use Case Diagram

The first step in system modeling is è

Each system function is called a use case. The use case diagram shows two key concepts: the ______and the ______, who is (True/False) always a person.

One approach to identifying use cases is to identify events the system must respond to. Three types of events can affect a system:

·  external event, which is ______

·  ______event which occurs at a specific point in time

·  state event which occurs when ______

Each use case can be documented as a series of steps users follow when they interact with the system. Sometimes the main steps have several variations, called ______.

Creating and Interpreting the Class Diagram

The class diagram è

The class symbol is a rectangle with three sections as follows. Describe what is included in each section (labeled A, B and C.)


The association relationship two classes is shown ______. The ______is written on each end of the line. UML refers to the number of associations as ______. The class diagram also shows generalization/specialization hierarchies (inheritance). If the name of a class is in italics, the class is an ______class which means that è.

Creating and Interpreting a Sequence Diagram

A sequence diagram shows ______, usually for one use case or scenario. the sequence diagram is often referred to as a ______model. The class diagram is often referred to as a ______model.

The actor can be shown as ______. Objects are shown as ______. The vertical lines below the actor and the objects are called ______and represent ______. The horizontal arrows represent ______in sequence. Data returned in response is shown as a ______line.

Using Three-Tier Design in OO Development

A useful way to look at the distinction between OOA and OOD is based on the three-tier design approach, introduced in Chapter 1. The three tiers include______, ______, and ______. Three-tier design requires that OO system developers separate three categories of classes when designing and building a system.

Separating these categories of classes supports the objective of creating ______system components, which is beneficial because a component can be modified with minimal effects on other components. The three-tier design approach, therefore, makes it easier to maintain and enhance the system. Additionally, independent components are easier to reuse, a major objective of OO development.

Introducing the Bradshaw Marina Case Study

The Bradshaw Marina case study is used throughout this text to demonstrate OO development principles and practices. This section describes Bradshaw Marina and its need for a computer system.

Exploring the Background of Bradshaw Marina

Bradshaw Marina is a privately owned corporation that rents boat slips and provides boat services on Clinton Lake.

Bradshaw Marina would like to have an automated system to track their customers, the slips they lease, and the boats in the slips. Initially, the system will simply maintain basic information for customers, slips, and boats, and perform day-to-day business tasks. Bradshaw eventually wants to enhance the system so that they can add boat service records. Later, they want to add billing features to the system. They want to be able to use the system to generate bills for both slip leases and boat services, record payments, send late notices, and produce accounts receivable and other accounting reports.

Identifying Bradshaw Use Cases and Scenarios

The first step in the OOA process is identifying use cases that fall within the scope of the system. The main events of interest involve customers—when a customer leases a slip, when a customer buys a new boat, and so on. Because these events involve customers, boats, and slips, the use cases also focus on customers, boats, and slips.

Identifying Bradshaw Problem Domain Classes

After identifying the use cases and scenarios, the next step is to explore the problem domain classes involved in the use cases. To do this the development team would meet with Bradshaw Marina to ask about the things that are involved in the work of the marina, in this case the customers, boats, leases, slips, and docks. Then, the team would begin an initial class diagram that includes these potential classes. Then, as more specific information is obtained about each class, the team would further model the problem domain classes.

Later on, the class diagram would be further developed by identifying and modeling the association relationship among classes.

Creating a Bradshaw Sequence Diagram

Methods can be added to the class diagram for Bradshaw Marina by exploring scenarios and documenting them with sequence diagrams. A sequence diagram should be created for each scenario of each use case.

Once use cases, scenarios, problem domain classes, and some of the object interactions have been documented, the development team can begin writing some OO program code to define the problem domain classes for Bradshaw Marina.

5