Question: Write a function written in Java and constructs a control flow graph (with a minimum or reduced number of nodes) of the input java code.
Write a function written in Java and constructs a control flow graph (with a minimum or reduced number of nodes) of the input java code. The function must handle at least the following statements and features with any depth of nesting:
1.Assignment statement and arithmetic statement
2. Simple logical expression and composite logical expression of two conditions (or Boolean values). A logical statement may appear as a condition (for If, While, and For), or in a logical expression.
3. If then and If then else statements
4. While statement
6. Read and Write statements( you may assume only one type of each read and write statements)
7. Comment statement
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
