TweetFollow Us on Twitter

September 93 - OOA/OOD

OOA/OOD

Mark J. Klocke

A structured engineering approach (methodology) is required to support the development of complex software systems. A methodology consists of a required set of development deliverables and formal guidelines for producing the deliverables. This article will present object-oriented analysis and design deliverables with examples from a Time Reporting System application. An automated and integrated tool set is a crucial component of a successful software project. Examples in this article were created with MacA&D, a commercial Computer Aided Software Engineering (CASE) tool from Excel Software.

Object-oriented methods offer improvements in quality, managing complexity, and ultimately reducing the development and maintenance cost of software projects. The project challenges to overcome are to flatten the object-oriented learning curve, apply objects to your domain, and achieve re-use of your domain objects. Several object-oriented analysis and design (OOA & OOD) methods, such as the Coad/Yourdon, Rumbaugh, Shlaer/Mellor, and Booch, are currently being used to address these challenges and improve the development of applications. Coupled with CASE tools these methods can provide an integrated, streamlined approach to software development (see Figure 1: Object-oriented Analysis and Design Deliverables).

In the Time Reporting System example, we boil down the myriad of OOA and OOD techniques to their essential elements; these elements are class diagrams, object (instance and communication) diagrams, and their supporting state and flow diagrams. In addition, we will use screen prototyping to express the sample application's user interface. Diagrams are integrated with a global data dictionary and requirement database to simplify model associations for development and maintenance. Other text deliverables such as the project specification, test information, and code will not be reviewed at this time. Chronologically, the deliverables in Figure 1 are produced top down, and left to right, with information in the data dictionary being supplied from the other documents.

Development Deliverables Overview

The Requirements Database integrates models by common requirements, providing traceability throughout the development and maintenance of the application. Requirements may be collected portions of a text document, or entered according to a user defined template.

Screen prototyping can be used to analyze the essential elements of the user interface prior to the formal design process. Menus, buttons, data fields, and other interface items may be used to quickly generate a sample interface and interactively browse through connected screens and dialogs.

A class diagram illustrates object classes and structures using a variety of symbols, line styles and line terminations. For each object class, attributes (data) and operations (algorithms) are identified and defined.

Some objects have an associated life cycle represented by specific states or modes in which the object can exist. A transition from one state to another will occur when a specific event takes place. Object life cycles can be represented by state transition diagrams or tables.

Data Flow Diagrams are used within some methodologies to model application context and object interfaces (data and control). Data Flow Diagrams are used more extensively for functional decomposition in Structured Analysis, and will only be touched upon briefly for this example.

While a class diagram is great for illustrating the static structure of classes from which objects are instantiated, it reveals little about how objects interact with each other. An object diagram is used to show how each mechanism in the design works by passing messages between object operations.

To ensure consistency and completeness, the various views of a software design must be integrated. A data dictionary integrates all the diagramming views into a common repository of information and provides detailed definitions for items used on diagrams.

Requirement Database

Historical data shows that defects which occur during the requirement definition phase are much more costly to correct than those introduced during the later design or implementation phases of development. This effect is compounded as the size of the project and development team grows. Requirement defects include missing, incomplete, ambiguous, or non-implemented requirements. Using a requirement database can reduce the risk and cost of requirement defects.

A requirement database is simply a list of requirement statements each uniquely identified by a name or number. Parent and child references are associated with each requirement statement to provide traceability. A parent reference identifies the source of a requirement, while a child reference targets a deliverable such as a design diagram or test procedure which satisfies the requirement. Transforming user requirements, concepts, and ideas into a detailed design ready for implementation is an iterative modeling process.

Each requirement statement is an unambiguous, testable fact (typically by multiple test cases) about a condition or capability needed by a user to solve a problem or achieve an objective. Requirements are processing, information, performance, or capacity statements about the system under design. System and product requirements are typically derived from market demands, quality, reliability, performance, and safety considerations.

The requirement database provides concrete links between requirement statements and other deliverables of the development process. Traceability provides a clear picture of how each requirement is satisfied and quick assessment of the impact of requirement changes.

To illustrate requirement statements and the other forms of modeling to follow, consider the analysis and design of a Time Reporting System. Here is a requirement used to specify this project:

NAME: Report$Employee$Sort
PARENT: FOREIGN TimeReports.Spec
DEFINITION: Employee reports shall be sorted by job title or
            alphabetically by last name.
CHILD: FORM TimeReports.Form Main Screen 
ERD TimeReports.ERD TRS 
OBJECT TimeReports.OBJ Generate Employee Reports 
FOREIGN Reports.TDS EmployeeSortTest 

Requirement statements can be written using a formal structure or as simple sentences as we have used here. References provide traceability to origin (parent) and development deliverables (children).

Screen Prototype

Screen prototyping can be an effective means of exposing requirements and achieving consensus on user interface early in a project. A screen prototype is simply a set of interconnected user screens containing interface elements such as data entry fields, buttons, menus, text and graphics. MacAnalyst supports dynamic interactive screen prototypes which allow users to provide constructive feedback on the user interface before starting the software design process.

Using the Time Reporting System example, two screens and a menu representing its user interface are shown below. Upon access (login) to the Time Reporting System, the main menu is displayed (see Figure 2-Time System Startup Screen).

The screen was created by defining the pull-down menus and menu commands. The following screens which use the same menu commands 'clone' the definition from the startup screen. In the Time Reporting System, the user selects commands from the File, Edit, and Report pull-down menus (see Figure 3-Interactively Browsing Screens). In Browse mode (interactive), selecting the New Time Sheet command from the File menu brings up the New Time Sheet window (see Figure 4-New Time Sheet Screen).

Like other views in the modeling process, interface items on the screens of a prototype are integrated with other CASE models via the data dictionary and requirement database.

Class Diagram

The class diagram shows each object class and its associated attributes and operations. Structures between classes such as inheritance are represented on the class diagram. In our Time Reporting System example, a fictitious third party class library (called SimpleApp) is used for the user interface and file manipulation. A new Coad/Yourdon style class library (TimeReports) was created for our time reports application.

The SimpleApp class named "Object" is at the root of the inheritance tree. The class "Application" is a subclass of "Event Handler." Subclasses, or the general/specific relationship, is shown by the rounded triangle. Aggregation, or whole/part relationships, are shown by a triangle such as "ListOfItems" being part of a "Document." The "Application" class will have attributes "TimeSheetsList," "ProjectList," and "EmployeeList" (which are references to instances of the "ListOfItems" container class), and operations "MainEventLoop," "DoMenu-Command," and "VerifyLogin," plus attributes and operations inherited from its parent classes (see Figure 5-Coad/Yourdon Style Class Diagram Portion of SimpleApp, and Figure 6-Coad/Yourdon Style Class Diagram - Time Reporting System).

Organizing data and algorithms into classes is an important part of analysis and design. Good candidate classes can often be chosen from a general description of the problem domain as in our example of Employee, Manager, Project, and TimeSheet. Design is an iterative process requiring many refinements as more is understood about the system under study. Object communication diagrams described below are an excellent way of revealing the inadequacies of a first draft class diagram by exposing missing or inconsistent attributes and operations.

Like other views of the system, the class diagram is an integrated part of the CASE repository. For example, within MacA&D, double-clicking on a Class object brings forward the Data Dictionary window and displays detailed information about that class including its attributes, operations and inherited classes. Detailed descriptions of each attribute and operation can be included in the dictionary.

State Transition Diagrams

Since objects may be dynamically allocated, real-time modeling techniques for state transitions and data/event flow can be used to detail each object. Data flow diagrams are used to provide a frame of reference, or context, for the system, and to provide another view of the objects abstract control and data interface.

Dynamically allocated objects have various states of operation, such as "Initialized," "Active," and "Failure Mode." The states of dynamic objects, often referred to as an object life-cycle, are modeled with a state transition diagram (STD).

State transition diagrams (STDs) and tables are a common modeling technique for expressing the finite states within a system or object, and events which can occur to cause a transition from one state to another. A state model can also express a list of actions which take place upon transition from one state to another.

In the Time Reporting System example, two states ("Active User" and "Active Admin") are detailed in subdiagrams. Upon initialization, a login dialog is presented. A correct login transitions service to one of two "Active" states and enables the menu commands. This is illustrated in Figure 7.

Object Communication Diagram

Object communication diagrams are used to show how mechanisms in the design work by passing messages between instantiated object classes. In our Time Reporting System example, five diagrams are sufficient to represent the new mechanisms of the Time System domain. Two of the seven original (SimpleApp) mechanisms for event handling were modified for our application. The Login and Project Reports mechanisms are shown.

After application initialization, the "VerifyLogin" operation of the Application invokes the iterate operation "EachItemDo" to verify the login EmployeeID with the Employee list IDs (see Figure 8-Object Communication Diagram - Login).

Now let's consider the mechanism of Generate Project Reports. In this mechanism, a menu Project Report command event is processed by the "Main Event Loop" which invokes the "ListInfoReport" operation with the requested project number. "ListInfoReport" iterates through the "TimeSheets" ListOfItems and if the project number matches the requested project number, the "TimeSheet" instances "Print" operation generates its portion of the report. When the search is complete Project notifies the Application instance (see Figure 9-Object Communication Diagram - Generate Project Reports).

Summary

This article presented an overview of object-oriented analysis and design techniques for software applications. A Requirements Database, Screen Prototypes, Class Diagrams, and Object Diagrams deliverables were presented. The diagrams were created using a CASE tool, MacA&D. In addition to easy creation and editing of diagrams, MacA&D allows designers to integrate the different modeling views of their project and provide easy navigation between these models.

Producing these deliverables within a CASE tool automates steps of the development process, such as error checking and producing reports. For example, when you have completed the class diagrams of a design, use the Relation Specifications report to automatically produce a complete text narrative of your design directly from the diagrams. Verification and balancing reports can check for literally hundreds of inconsistencies or omissions between diagrams and dictionary information within seconds. Together OOA and OOD techniques coupled with CASE technology can provide a powerful method for software development.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.