Question

In: Computer Science

Using any computing tool, draw all flowgraphs (for every module) and calculate the cyclomatic complexity, v(G),...

Using any computing tool, draw all flowgraphs (for every module) and calculate the cyclomatic complexity, v(G), essential complexity, ev(G), module design complexity, iv(G), system design complexity, S0, and integration complexity, S1for the software code

Solutions

Expert Solution

Referring the image of control flow graph attached

cyclomatic complexity can be calculated in following way:

1)Count the number of regions. As seen in the CFG(Control flow graph) there are 11 regions which I have numbered.

2) Count the no. of predicates + 1. As seen in CFG I have shaded predicate nodes which are total 10 nodes. Hence cyclomatic complexity=10+1=11.

Therefore cyclomatic complexity=11

Essential complexity, ev, is calculated by flowgraph reduction. Flowgraph is reduced by removing decisions that conform to single-entry, single-exit constructs. In above case if(p==q) block has single entry and single exit. Hence can be reduced to single construct.

Therefore Essential complexity=1

Module design complexity is calculated by completely removing decisions and nodes that do not affect the control calls over a module’s immediate subordinates. Above graph is reduced as following:

Therefore Module design Complexity=2

Integration Complexity is given by formula S1 = (Σ iv(Gi )) - n + 1

where n is number of modules. Here we have 5 modules and respective IVs are shown in figure.

Using formula S1=(2+1+1+1+1)-5+1=2

Therefore Integration Complexity=2


Related Solutions

Welcome to Module 4! Critical to all cultures is communication. Imagine the complexity of effective communication...
Welcome to Module 4! Critical to all cultures is communication. Imagine the complexity of effective communication in your culture and how it becomes even more complicated when attempting to communicate in cultures different than your culture. This week you will choose two different cultures. Address the following in your response. Initial Posting: Analyze the potential for miscommunication related to verbal communication, nonverbal communication, communication style, and language structure.
For the following exercises, calculate u ⋅ v. Given v = 〈−3, 4〉 draw v, 2v, and 1/2 v.
For the following exercises, calculate u ⋅ v.Given v = 〈−3, 4⟩ draw v, 2v, and 1/2 v.
The construction of a dual D(G) can be applied in any plane graph G: draw a...
The construction of a dual D(G) can be applied in any plane graph G: draw a vertex of D(G) in the middle of each region of G and draw an edge e* of D(G) perpendicular to each edge e of G; e* connects the vertices of D(G) representing the regions on either side of e. a) A dual need not be a graph. It might have two edges between the same pair of vertices or a self-loop edge (from a...
As a tax professional, you are responsible for using every tool at your disposal to ensure...
As a tax professional, you are responsible for using every tool at your disposal to ensure your client communicates effectively with the IRS. Sometimes valuable guidance can come from an analysis of documents published by the IRS. Review the sample Chief Counsel Memorandum and the IRS Electronic Reading Room. Discuss the importance of structuring a response memo to the IRS similar to the Chief Counsel Memorandum.
Using the Google Draw tool, create a marginal revenue and demand for a monopolist graph. Then...
Using the Google Draw tool, create a marginal revenue and demand for a monopolist graph. Then answer the following questions: What is the relationship between Marginal Revenue (MR), and Demand (D) for a monopolist? For a non-price discriminating monopolist (a monopolist who charges only one price), if the cost for producing one extra unit of a product where $0, what point on your curve should the monopolist produce? (Hint: think Marginal Benefit/Revenue = Marginal Cost or MB=MC) Make sure to...
Prove or disprove: If G = (V; E) is an undirected graph where every vertex has...
Prove or disprove: If G = (V; E) is an undirected graph where every vertex has degree at least 4 and u is in V , then there are at least 64 distinct paths in G that start at u.
1. The value of any investment is found by computing the C. present value of all...
1. The value of any investment is found by computing the C. present value of all future cash flows.   2.In a one−period valuation model, a decrease in the required return on investments in equity causes a(n) ________ in the ________ price of a stock. D. increase; current These are the answers to these question, could you explain why this is the answer? Please give me an explanation.
Calculate the time complexity of each algorithm for best, worst and average cases. Give all steps...
Calculate the time complexity of each algorithm for best, worst and average cases. Give all steps of your calculation and results in Big-O notation. algorithm : Selection Sort Bubble Sort Insertion Sort
This is a straightforward program that will "draw" a rectangle using any character selected by the...
This is a straightforward program that will "draw" a rectangle using any character selected by the user. The user will also provide the width and height of the final rectangle. Use a nested for loop structure to create the output. Input: This program will draw a rectangle using your character of choice. Enter any character: [user types: *] Enter the width of your rectangle: [user types: 20] Enter the height of your rectangle: [user types: 5] Output: ******************** ******************** ********************...
Using the knowledge you gathered throughout this module and any web resources, describe the process of...
Using the knowledge you gathered throughout this module and any web resources, describe the process of genetic engineering. What are some advantages and disadvantages of genetic engineering? Why is there so much controversy surrounding this field? What are some ethical issues associated with the production of genetically engineered organisms? Please provide a scientific rationale for your response. (400 - 500 words; 4 points)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT