UNIT 3
1) What are UML state machine diagrams?
State chart Diagrams A UML state chart diagram, as shown in Figure 29.1, illustrates the interesting events and
states of an object, and the behavior of an object in reaction to an event. Transitions are shown as arrows, labeled with their
event. States are shown in rounded rectangles.
2) Define events, states, and transitions?
Events, States, and Transitions An event is a significant or noteworthy occurrence. For example: A telephone
receiver is taken off the hook. A state is the condition of an object at a moment in time—the time between events. For
example: • A telephone is in the state of being "idle" after the receiver is placed on the hook and until it is taken off the hook.
A transition is a relationship between two states that indicates that when an event occurs, the object moves from the prior
state to the subsequent state. For example: • When the event "off hook" occurs, transition the telephone from the "idle" to
"active" state.
3) What is transition action?
A transition can cause an action to fire. In a software implementation, this may represent the invocation of a
method of the class of the statechart diagram.
4)What is an implementation model?
In UP terms, there exists an Implementation Model. This is all the implementation artifacts, such as the source
code, database definitions, JSP/XML/HTML pages, and so forth. Thus, the code being created in this chapter can be
considered part of the UP Implementation Model.
5)What are the steps involved in mapping design to code?
Mapping Designs to Code Implementation in an object-oriented language requires writing source code for: class
and interface definitions method definitions
6) Explain with an example of creating class definitions from DCDs.
Creating Class Definitions from DCDs At the very least, DCDs depict the class or interface name, superclasses,
operation signatures, and attributes of a class. This is sufficient to create a basic class definition in an OO language. If the
DCD was drawn in a UML tool, it can generate the basic class definition from the diagrams. Defining a Class with Method
Signatures and Attributes.
7) What are collection classes?
Collection Classes in Code One-to-many relationships are common. For example, a Sale must maintain visibility
to a group of many Sales LineItem instances.
8)What is Test driven development?
(TDD) Test-Driven or Test-First Development An excellent practice promoted by the Extreme Programming (XP)
method [Beck00], and applicable to the UP and other iterative methods (as most XP practices are), is test-driven
development (TDD) or test-first development. In this practice, unit testing code is written before the code to be tested, and
the developer writes unit testing code for all production code. The basic rhythm is to write a little test code, then write a little
production code, make it pass the test, then write some more test code, and so forth.
9) Explain in detail a sample application for mapping design to code.
Domain layer of classes in Java for this iteration. The code generation is largely derived from the design class
diagrams and interaction diagrams defined in the design work, based on the principles of mapping designs to code.. This
code defines a simple case; it is not meant to illustrate a robust, fully developed Java program with synchronization,
exception handling, and so on. Comments excluded on purpose, in the interest of brevity, as the code is simple.
10) Define a component.
A component represents a modular part of a system that encapsulates its contents and whose manifestation is
replaceable within its environment. A component defines its behavior in terms of provided and required interfaces. As such,
a component serves as a type, whose conformance is defined by these provided and required interfaces
11) What are the basic elements of deployment diagrams?
The basic element of a deployment diagram is a node, of two types: device node (or device) A physical (e.g., digital
electronic) computing resource with processing and memory services to execute software, such as a typical computer or a
mobile phone. execution environment node (EEN)
12) What is Test driven development?
(TDD) Test-Driven or Test-First Development An excellent practice promoted by the Extreme Programming (XP) method
[Beck00], and applicable to the UP and other iterative methods (as most XP practices are), is test-driven development (TDD)
or test-first development. In this practice, unit testing code is written before the code to be tested, and the developer writes
unit testing code for all production code. The basic rhythm is to write a little test code, then write a little production code,
make it pass the test, then write some more test code, and so forth.
13) What are the steps involved in mapping design to code?
Mapping Designs to Code Implementation in an object-oriented language requires writing source code for: class and
interface definitions , method definitions
14) What are post conditions?
• Describe changes in the state of objects in the domain model that are true when the operation has finished.
• They are not actions to be performed during the operation
15)Draw a use case diagram