What is the maximum number of paths through the graph

Assignment Help Software Engineering
Reference no: EM13722055

Question 1
The following program will display an integral solution to the quadratic equation ax2+bx+c for integral values of a,b, and c, where a,c fall between 0 and 10, while b falls between 1 and 1000.
        read(a,b,c);
        if (a != 0) {
            d = b * b - 4*a*c;
            if (d <0)
                x = 0;
            else
                x=(-b+(int)sqrt(d))/(2*a);
        }
        else {
            x = -c/b;
        }
        if (a*x*x+b*x+c == 0)
            printf("%d is an integral solution",x);
        else
            printf("There is no integral solution");

1. Identify all parameters and environment variables. (5 marks)

2. One major characteristic relates to the discriminant(variable d). Write down a category and an accompanying partition for the discriminant.

3. Another major characteristic relates to how many roots are real. Write down a category and an accompanying partition for number of real roots.

4. Another major characteristic relates to how many roots are integer. Write down a category and an accompanying partition for number of integer roots.

2. Given the following fragment of code, how many tests are required for 100% decision coverage?

if width > length

   thenbiggest_dimension = width

     if height > width

             thenbiggest_dimension = height

     end_if

elsebiggest_dimension = length  

            if height > length 

                thenbiggest_dimension = height

          end_if

end_if

3.  Given the following code, which statement is true about the minimum number of test cases required for full statement and branch coverage? (10 marks)

 

     Read p

 

     Read q

 

     IF p+q> 100

 

          THEN Print "Large"

 

ENDIF

 

    IF p > 50

 

          THEN Print "p Large"

 

    ENDIF

4.  You have designed test cases to provide 100% statement and 100% decision coverage for the following fragment of code. (10 marks)

if width > length then biggest_dimension = width

else biggest_dimension = length

end_if

The following has been added to the bottom of the code fragment above. print "Biggest dimension is " &biggest_dimensionprint "Width: " & width print "Length: " & length How many more test cases are required?

Title: Path & Path Production, Syntax testing

Path & Path productions

1. Take the following flow graph and use the procedure in chapter 8 to derive an equivalent regular expression. Show all intermediate graphs (to ensure that you follow the procedure, rather than just guessing the regular expression). (20)

1147_Maximum number of paths through the graph.png

2. What is the maximum number of paths through the graph?

3. What is the approximate minimum number of paths through the graph?

4. If in the above graph, a, b, c and g contain construct operations, and d, h and l contain destruct operations. All others do not contain any construct or destruct operations.

  • Can there be more Ds than Cs?
  • Can there be more Cs than Ds?
  • What's the problem with the design?

Reference no: EM13722055

Questions Cloud

The cleavage site is between the c and atgg : BtsCI is a restriction enzyme that recognizes and cuts at the following site CCATCCC?ATGG Would this digest produce a blunt or sticky end? The cleavage site is between the C and ATGG as shown about with an insert symbol indicating where it ..
After-tax cost of debt problem : The Heuser Company's currently outstanding bonds have a 9% coupon and a 14% yield to maturity. Heuser believes it could issue new bonds at par that would provide a similar yield to maturity. If its marginal tax rate is 40%, what is Heuser's after-tax..
What is the capital gains yield : The Toy Chest pays an annual dividend of $4.80 per share and sells for $93.20 a share based on a market rate of return of 15 percent. What is the capital gains yield?
What is the weighted average cost of capital : Debreu Beverages has an optimal capital structure that is 70% common equity, 20% debt, and 10% preferred stock. Debreu's pre-tax cost of equity is 9%. Its pre-tax cost of preferred equity is 7%, and its pre-tax cost of debt is also 5%. If the corpora..
What is the maximum number of paths through the graph : What is the maximum number of paths through the graph and what is the approximate minimum number of paths through the graph?
Examples of ethical and unethical employment practices : What are some real world examples of ethical and unethical employment practices dealing with compensation (wage or benefits) you have read about, seen in the news, or encountered at your place of employment? What were the outcomes of those practic..
What are the monthly payments home mortgage : What are the monthly payments (principal and interest) on a 15-year home mortgage for an $180,000 loan when interest rates are fixed at 8 percent?
Upfront total after-tax cash cost for this proposed project : Reality Automotive Corp. (“RAC”) manufactures after-market parts for automobiles and trucks (seat belts, windshield wiper blades, floor mats, and truckbed mats). The company is evaluating the expansion of its manufacturing plant to enable it to take ..
Find what would be its velocity : If light from a star of a wavelength of 520.3 nm at rest were shifted to 511.2 nm observed, what would be its velocity

Reviews

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd