Flow charts A flow chart is a schematic representation of an algorithm or a process. In UML and Rational Rhapsody, you can think of a flow chart as a subset of an activity diagram that is defined on methods and functions. You can model methods and functions using flow charts in all Rational Rhapsody programming languages. Only in Rational Rhapsody in C and Rational Rhapsody in C++ can readable structured code be generated from a flow chart. During code generation, for the actions defined in a flow chart Rational Rhapsody can generate structured code for If/Then/Else, Do/While, and While/ Loops.
The code generator algorithm for a flow chart can identify Loops and Ifs, the expressions for these constructs is on the guards of the action flows. For more information about activity diagrams, see Activity diagrams . Define algorithms with flow charts One useful application of flow charts is in the definition of algorithms. Algorithms are essentially decompositions of functions into smaller functions that specify the activities encompassed within a given process. This flow chart approach to code generation is to reduce the diagram to blocks of sequential code and then search for If/Loop patterns in those blocks.
The following structured programming control structures are supported in flow charts: Љ Simple If Љ If/Then/Else Љ While loops (where the test is at the start of the loop) Љ Do/While loops (where the test is at the end of the loop) If the algorithm does not succeed to impose the above structure, then it will need to use a GoTo. Rational Rhapsody 655