15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Automating Software Engineering with CASE 117<br />

Like flowcharts, UML provides a way to visually design a program with universally<br />

understood symbols and diagrams. Unlike flowcharts, which model<br />

only a program’s actions, UML offers different types of models <strong>for</strong> defining a<br />

program:<br />

✦ Functional models<br />

✦ Object models<br />

✦ Dynamic models<br />

Book I<br />

Chapter 5<br />

Managing Large<br />

Projects with<br />

Software<br />

Engineering<br />

You don’t have to use every type of diagram to define your program; use as<br />

many as you need.<br />

Of course, UML and other modeling methods are never perfect:<br />

✦ Just because you model a program perfectly doesn’t always mean that<br />

design is actually feasible. Many designs may look perfect on paper but<br />

fail dramatically when put into actual use. (Think of the watertight doors<br />

on the Titanic.)<br />

✦ Modeling methods, such as UML, offer so many different diagrams that<br />

it’s possible that two diagrams of the same program can describe mutually<br />

exclusive features. Because each type of a diagram focuses on a different<br />

view of the program, you could create conflicting designs.<br />

Despite these problems, design methods like UML are still an improvement<br />

over no design plans whatsoever. Just remember that UML diagrams are<br />

meant to offer a standard way to model programs so other people can see<br />

and understand your design be<strong>for</strong>e you start writing any actual code in a<br />

specific <strong>programming</strong> language.<br />

Functional model<br />

A UML functional model (or a Use Case diagram) describes how a user interacts<br />

with the program, as shown in Figure 5-3. By displaying users as stick<br />

figures and program functions as an oval, Use Case diagrams make it easy to<br />

see what the program is supposed to do without confusing you with how the<br />

program will do it.<br />

Object model<br />

A UML object model (or a Class diagram) defines how to divide a program<br />

into parts or objects. Each Class diagram defines an object’s name, data<br />

(properties), and operations (methods), as shown in Figure 5-4.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!