J.E.D.I
2.4.2 UML Baseline Diagrams
There are nine 9 baseline diagrams that are specified in UML. They are briefly discussed in this section. Their use will be later on presented in detail as work products
are produced within the major phases of the development process.
Use Case Diagram The Use Case Diagram provides a basis of communication between end-users and
developers in the planning of the software project. It captures important user-visible functions which may be small or large. It achieves a discrete goal for the user. It
attempts to model the system environment by showing the external actors and their connection to the functionality of the system. Figure 2.8 shows an example of a Use
Case Diagram.
Software Engineering 51
Figure 2.8 Sample Use Case Diagram
J.E.D.I
Class Diagram The Class Diagram shows the static structure of the domain abstractions classes of
the system. It describes the types of objects in the system and the various kinds of static relationship that exists among them. It shows the attributes and operations of a
class and constraints for the way objects collaborate.
This modeling tool produces the most important diagram of the system because it is used to model an understanding of the application domain essentially part of a human activity
system, and objects are also understood as part of the resulting software system. Figure 2.9 shows an example of a class diagram.
Software Engineering 52
Figure 2.9 Sample Class Diagram
J.E.D.I
Package Diagram The Package Diagram shows the breakdown of larger systems into logical grouping of
smaller subsystems. It shows groupings of classes and dependencies among them. A dependency exists between two elements if changes to the definition of one element may
cause changes to the other elements. Figure 2.10 shows an example of a package diagram.
Software Engineering 53
Figure 2.10 Sample Package Diagram
J.E.D.I
Activity Diagram The Activity Diagram shows the sequential flow of activities. Typically, it is used to
show the behavior of an operation, use-case flow of events, or event trace. It complements the use case diagram by showing the work flow of the business. It
encourages the discovery of parallel processes, which helps eliminate unnecessary sequences in the business process. It complements the class diagram because it
graphically shows the flow of each operations similar to a flow chart. Figure 2.11 shows an example of an activity diagram.
Software Engineering 54
Figure 2.11 Sample Activity Diagram
J.E.D.I
Sequence Diagram The Sequence Diagram shows the dynamic collaborative behavior between objects for a
sequence of message sends between them in a sequence of time. Time sequence is easier to see in the sequence diagram read from top to bottom. Choose sequence
diagram when only the sequence of the operations need to be shown. Figure 2.12 shows an example of a sequence diagram.
Software Engineering 55
Figure 2.12 Sample Sequence Diagram
J.E.D.I
Collaboration Diagram The Collaboration Diagram shows the actual objects and their links which represent
the network of objects that are collaborating. Time sequence is shown by numbering the message label of the links between objects. Collaboration diagram is best suited
when the objects and their links facilitate understanding of the interaction among objects, and the sequence of time is not important. Figure 2.13 shows an example of a
collaboration diagram.
Software Engineering 56
Figure 2.13 Sample Collaboration Diagram
J.E.D.I
State Transition Diagram
It shows all the possible states that objects of the class can have and which events cause them to change. It shows how the objects state changes as a result of events that are
handled by the object. Good to use when a class has complex life cycle behavior. Figure 2.14 shows an example of a state transition diagram.
Component Diagram
The Component Diagram shows the software components in terms of source code, binary code, dynamically linked libraries etc. Figure 2.15 is an example of a component
diagram.
Software Engineering 57
Figure 2.14 Sample State Transition Diagram
Figure 2.15: Sample Component Diagram
J.E.D.I
Deployment Diagram
The Deployment Diagram shows the physical architecture of the hardware and software of the system. It highlights the physical relationship among software and hardware
components in the delivered system. Components on the diagram typically represent physical modules of code and correspond exactly to the package diagram. Figure 2.16 is
an example of a deployment diagram.
Creating a UML Project Using Java
TM
Studio Enterprise 8
Java
TM
Studio Enterprise 8 is an Integrated Development Environment IDE that incorporates a multi-window editor and mechanism for managing files that make up the
projects including files for models, source codes and test cases. It has links to the compiler so that codes can be compiled within and debugger to help the programmer step
through the code to find errors.
To create a UML Project, simply follow the steps. 1. Start the Java
TM
Studio Enterprise 8 Application. A window similar to the window shown in Figure 2.17 is displayed.
Software Engineering 58
Figure 2.16 Sample Deployment Diagram
Figure 2.17: Welcoming Window of Java
TM
Studio Enterprise
J.E.D.I
2. Click the Create New Project button. This will display the New Project Dialog box as shown in Figure 2.18. In the Categories list, select UML. In the Projects list,
select Platform-Independent Model.
3. Click the Next button. The New Platform-Independent Model Dialog Box will appear as shown in Figure 2.19. At the Project Name text field, enter the name of
the project. In the example, the project name is “Ang Bulilit Liga”. Next, at the Project Location text field, enter the directory to which the project files will reside.
In the example, it is in the AngBulilitLiga directory under the home directory.
Software Engineering 59
Figure 2.19: New Platform-Independent Dialog Box Figure 2.18: New Project Dialog Box
J.E.D.I
4. Click the Finish Button. The New Wizard Dialog Box will appear which is used to create the first diagram of the project. It is shown in Figure 2.20. At the Diagram
Types list, select the type of diagram you will create. In the example, it is a Use Case Diagram. At the Diagram Name text field, enter the name of the diagram. In
the example, it is the Club Membership Maintenance.
5. Click the OK button. The window shown in Figure 2.21 is displayed. At this point, you can now create your diagram. The modeling elements are presented in the Modeling
Palette found at the right side of the window. The Project Tab found at the left side presents the organization of the models or files of the project. The files and models
are under the “Ang Bulilit Liga” Project Space.
Software Engineering 60
Figure 2.20: New Wizard Dialog Box
Figure 2.21: Model Design Window
J.E.D.I
3 Requirements Engineering
Designing and building a computer system is challenging, creative and just plain fun. However, developing a good software that solves the wrong problem serves no one. It is
important to understand users needs and requirements so that we solve the right problem and build the right system.
In this chapter, we will be discussing the concepts and dynamics of requirements engineering. It is a software development phase that consists of seven distinct tasks or
activities which has a goal of understanding and documenting stakeholders requirements. Two important models will be built, namely, requirements model which
is the system or problem domain model, and the analysis model which serves as the base model of the software solution model. The Requirements Traceability Matrix
RTM will be introduced to help software engineers manage requirements, and the requirements metrics and its significance will also be discussed.
3.1 Requirements Engineering Concepts