Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Software Engineering Expert

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?

Software Engineering, Computer Science

  • Category:- Software Engineering
  • Reference No.:- M91261442
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in Software Engineering

Assignment part 1objectives to learn to identify the

Assignment Part 1 Objectives: To learn to identify the relevant use cases for a given application, describe the use cases and develop an object-oriented domain model. Problem Statement - Standing Orders Management System ...

Overviewyou are required to modify and logically extend

Overview You are required to modify and logically extend the functionality of a provided code base to implement a game. This requires you to modify the code base as well as create documentation and implement various user ...

Assignment lab - statement of workclient liberty vacation

Assignment Lab - Statement of Work Client: Liberty Vacation Planning Inc. (LVP) Project: Website Assessment 1. Project Objectives With this statement of work, LVP is engaging you to conduct a website assessment to determ ...

Write review on this article with apa formatgovernment

Write review on this article with APA format. Government surveillance is a major issue in the United States and globally. Surveillance refers to any collection and processing of personal data, whether, identifiable or no ...

The research paper for this course is about some of the

The research paper for this course is about some of the best sources of digital evidence for child abuse and exploitation, domestic violence, and gambling according to the National Institute of Justice. Research commerci ...

Address the following integrating biblical perspectives

Address the following, integrating biblical perspectives where appropriate: Define a hate crime and describe how white supremacist groups use the Internet to spread their message of hate. Explain why hate crime legislati ...

In this assignment you will answer the following questions

In this assignment, you will answer the following questions related to Android platform and Android security design. 1. Describe Android architecture in detail by explaining the four conceptual layers. 2. Describe Androi ...

Instructions - onion routingin this assignment you will

INSTRUCTIONS - ONION ROUTING In this assignment, you will answer the following questions related to Onion Routing and Tor. 1. Describe the infrastructure of Onion Routing and explain how it works for providing anonymity ...

Instructionsprivacy-preserving data miningdata mining

INSTRUCTIONS PRIVACY-PRESERVING DATA MINING Data mining technology can be exploited to reveal sensitive information from the original data. Thus it is important to preservethe privacy of the parties that the data refer t ...

Write reply to this article with references with apa

Write reply to this article with references with APA bibliography. Hate Crimes Over the past couple of years, hate crimes have been on the rise in America's largest cities. Studies show that there were sharp spikes in th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As