Draw a control flow graph

Assignment Help Software Engineering
Reference no: EM13669511

Assignment 1:  Graph Coverage

For your Assignment 1, complete the following exercises:

1. Answer questions (a)-(d) for the graph defined by the following sets:

N = {1, 2, 3, 4, 5}

N0 = {1}

Nf = {5}

E = {(1,2), (2,3), (1,3), (2,4), (4,1), (3,5)}

a) Draw the graph (Do not use a generation tool. Draw it yourself and scan in or use power point tool or similar one)

b) List test requirements (TR) and test paths for Node Coverage

c) List test requirements (TR) and test paths for Edge Coverage

d) List the test requirements (TR) for Edge-Pair coverage (requirements must be of edge length 2)

2. Answer questions (a)-(c) for the graph defined by the following sets:

N = {1, 2, 3, 4}

N0 = {1}

Nf = {4}

E = {(1,2), (2,3), (1,3), (3,2), (3,4), (1,4)}

Also consider the following (candidate) test paths:

t0 = [1,3,4 ]

t1 = [1, 4]

a) Draw the graph (Do not use a generation tool. Draw it yourself and scan in or use power point tool or similar one)

b) Does the given set of test paths satisfy Edge-Pair Coverage? If not, identify what edge(s) are missing.

c) List test paths that achieve Node Coverage but not Edge Coverage on the graph.

3. Using below definitions for the graph, use Data Flow tool to determine for variable x. Capture the screenshot of at least one execution and paste in the document.

N = {0,1, 2, 3, 4,5,6,7}

N0 = {0}

Nf = {7}

E = {(0,1),(1,2), (2,3), (2,4), (3,5), (4,5), (5,6),(6,5),(6,7),(1,7)}

def(1)=def(3)=use(2)=use(3)=use(6) =use(7)= (x)

def(0)=def(4)=def(6)=use(4)=use(7)=(y)

a) All-def coverage

b) All-use coverage

c) All-du-path coverage

4. Use the following program fragment for questions (a)-(c) below.

a=m;  // node 0

y = x; // node 1

if (m > 0)

{

a++; // node 2

}

else

{

a=2*y; // node 3

}

while (x < 5)    // node 4

{

y = 5*a; // node 5

x--;     // node 6

}

z = a + y; // node 7

(a) Draw a control flow graph for this program fragment (Do not use a generation tool. Draw it yourself and scan in or use power point tool or similar one). Use the node numbers given above.

(b) Which nodes have defs for variable a and which nodes have uses for variable a?

(c) Enumerate all of the du-paths for variable y.

5. For the following questions a-c, consider the method FSM for a (simplified) programmable thermostat. Suppose the variables that define the state and the methods that transition between states are:

partOfDay : {Wake, Sleep}

temp : {Low, Medium, High}

// Initially "Wake" at "Low" temperature

// Effects: Advance to next part of day

public void advance();

// Effects: Make current temp higher, if possible

public void up();

// Effects: Make current temp lower, if possible

public void down();

(a) How many states are there and what are they?

(b) How many edges are there and what are they?

(c) Draw and label the states (with variable values) and transitions (with method names). Notice that all of the methods are total.

(d) A test case is simply a sequence of method calls. Provide a test set that satisfies Edge Coverage on your graph (using state labels).

6. Use activity graph for ATM withdraw funds on page 90 (Fig 2.42) up to Prompt for Transaction and then use the below continuation for transfer selection to answer the (a)-(c) questions.

1443_Use case.png

a) Construct a use case to include name, summary, actor, precondition, description, alternatives, and post condition

b) Construct a use case scenario (specific steps through use case)

c) Construct test case for the use case scenario with specific values for purpose, prereq, test data, steps, and expected output.

Reference no: EM13669511

Questions Cloud

Speed of the golf ball immediately after the collision : A golf ball traveling 3 m/s to the right has a head-on collision with a stationary bowling ball in a friction-free environment. If the collision is almost perfectly elastic, the speed of the golf ball immediately after the collision is:
Resolving power of microscope depends on wavelength utilized : The resolving power of a microscope depends on the wavelength utilized. If one wished to "see" a particular type of molecule, a resolution of 1.2 10-10 m would be needed. If electrons are used (in an electron microscope), what minimum kinetic energy ..
Magnitude of the magnetic force exerted on the particle : A particle with a mass of 6.64*10^-27 kg and a charge of +3.20*10^-19 C is accelerated from rest through a potential dissimilarity of 2.45 * 10^6 V. The particle then enters a uniform 1.60 T magnetic field.
Review web 2.0 tools discussion : Review the web sites that have Web 2.0 Tools, be sure to share them with the rest of the class -  create a separate posting for each tool
Draw a control flow graph : Construct a use case to include name, summary, actor, precondition, description, alternatives, and post condition - construct a use case scenario (specific steps through use case)
The net present value npv model : The Net Present Value (NPV) Model
Fringe benefit tax and capital gain tax : Advise ABC of its FBT consequences arising out of the above information, including calculation of any FBT liability, for the year ending 31 March 2014. Assume that ABC would be entitled to input tax credits in relation to any GST-inclusive acquisi..
Explain the factors influencing optimum size : Identify the nature of resource cost structure and the practical significance of different costs and explain the factors influencing optimum size and the significance of demand and supply relationships;
Contribution of security selection to relative performance : Calculate the total value added of all the manager's decisions period and calculate the value added (or subtracted) by her countt allocation decisions.

Reviews

Write a Review

Software Engineering Questions & Answers

  Determine one number missing from the sequence

Certain major software corporation likes to use in their interviews. Like many algorithm design problems, there are many possible answers, but I have presented one of the more generally accepted ones.

  Calculation of the hypotenuse

Construct a C# console application that calculate the hypotenuse of a right triangle. The calculation of the hypotenuse of a right triangle is based on the Pythagorean Theorem:

  Programming frameworks besides asp.net

Name three other web programming frameworks besides ASP.NET. Explain the ways that ASP.NET is different than other web programming frameworks.

  Compare the quality of commercial proprietary code

Compare the quality of commercial proprietary code with open-source code. These comparisons should consider implementations of the same functionality.

  Question 1a briefly describe the role of each of following

question 1a briefly describe the role of each of following four main abstractions that form part of an soa-i

  Explain and justify the need for good hci practice

Explain and justify the need for good HCI practice and discuss the role of cognitive psychology in the design of user interfaces.

  Draw erd for student entity

Draw and ERD for this situation. What attribute or attributes did you designate as the identifier for the STUDENT entity? Why?

  As part of your job you should complete a 10-to-15 page

tonys chips has recently been sold to a new independent company. the new company has hired you to manage a project that

  List of major software components

Taylor's Professional Services is a technical and engineering staffing service.  When a TPS client company determines that it will need a temporary professional or scientific employee, it issues a staffing request against the contract it previousl..

  Explain the basic architechture of a knowledge based system

Describe a design of your chosen system and explain the basic architechture of a knowledge based system.

  Create risk management policy to addresse security breaches

Oorganization which permitted unauthorized individual access to valuable data. Your job is to create risk management policy that addresses the two security breaches and how to mitigate these risks.

  Security characteristics such as confidentiality

1. assume that a security model is needed for protection of information in your class. using the nstissc model examine

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