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

  Steps to follow in evaluation of software packages

Top Sail's owner read an article about software packages, and she asked you, as an IT consultant, for your advice. When you evaluate software packages, what steps will you follow?

  Compute student grades via linux shell script

Construct a shell script to run on Knoppix or Linux, that will compute and display the letter grades for the students based on the average of four test scores.

  Explain what is the potential impact of changes to budgets

How can a project scope management plan help manage the3 project constraints of time, scope, and cost? What is the potential impact of changes to budgets, schedules, and deliverable if changes are allowed to occur after the project is approved

  Investigate and analyse the effect of applying cmmi practice

ITECH3501- 6501 Principles of Software Engineering:  Investigate and analyse the effect of applying CMMI practices/processes in an Agile environment in terms of business performance improvement and the limitations/restrictions of using both, and writ..

  Question about hippa rights

I have found that to date, the largest offense is looking into family records even though workers are warned not too and that this is a violation of that family member's HIPAA's rights.

  Identifies the organization information systems

Riordan Manufacturing is a global plastics manufacturer employing 550 people with projected annual earnings of $46 million. The company is wholly owned by Riordan Industries, a Fortune 1000 enterprise with revenues in excess of $1 billion.

  What needs to be considered in devising a companys policy

what needs to be considered in devising a companys policy for selecting a methodology to develop software

  Describe the current deficiencies andor need for the new

module practice select a system of your choice and describe the system life cycle. construct a detailed flow diagram

  Create a solution in java file

Assume you have been asked through a tax return preparer to create a program which will help him calculate taxes. This preparer will at most have one hundred customers.

  You are working as student assistance for an engineering

you are working as student assistance for an engineering firm and are paid by the hour. every two weeks you turn in a

  Describe your chosen architecture pattern

Include charts or diagrams created in Visio or an equivalent such as Dia. The completed diagrams / charts must be imported into the Word document before the paper is submitted.

  Describing arrow points to object in communication diagram

Why would you design a communication diagram instead of sequence diagram? Describe what the arrow which points to the object in a communication diagram signifies.

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