Version Control:: Else If (I%2 1) Write (" ..Red!") Else If (I%2 2) Write (" Blue!") End Ans
Version Control:: Else If (I%2 1) Write (" ..Red!") Else If (I%2 2) Write (" Blue!") End Ans
Draw flow graph, determine cyclomatic complexity and derive test cases for the following code snippet.
if( i %2 == 0)
write(“……green!!”);
else
if(i%2==1)
write(“…..red!”);
else
if(i%2==2)
write(“……blue!”);
end
Ans:
Version Control:
Version control is a system that records changes to a file or set of files over time so that
you can recall specific versions later. For the examples in this book you will use
software source code as the files being version controlled, though in reality you can do
this with nearly any type of file on a computer.
Design Class Diagram (DCD):
Class diagrams show the classes of the system, their interrelationships (including
inheritance, aggregation, and association), and the operations and attributes of
the classes. Class diagrams are used for a wide variety of purposes, including both
conceptual/domain modeling and detailed design modeling.
As we’ve explored, the same UML diagram can be used in multiple perspectives (Figure 16.2). In a conceptual
perspective, the class diagram can be used to visualize a domain model. For discussion, we also need a unique
term to clarify when the class diagram is used in a software or design perspective. A common modeling term for
this purpose is design class diagram (DCD), which I’ll use regularly in later chapters. In the UP, the set of all
DCDs form part of the Design Model. Other parts of the Design Model include UML interaction and package
diagrams.
Visibility Mode:
The visibility mode specifies how the features of base class are visible to the derived
class.
Private: when a derived class privately inherits a base class, the protected and public
members of base class become private members of the derived class.
Public: in public mode, the protected and public members of class become protected
and public members of derived class respectively.
Protected: In protected mode, the protected and public members of base class
become protected members of derived class.