Draw a control flowchart

Assignment Help Computer Engineering
Reference no: EM131240644

STQA Exercise -

Problem set 1 - Scenario: A vending machine dispenses either hot (e.g. tea or coffee) or cold drinks (e.g. water or soda). If you choose a hot drink, it asks if you want milk (and adds milk if required), then it asks if you want sugar (and adds sugar if required), then you drink is dispensed.

a) Draw a control flowchart for this example using one statement for the selection of the type of a drink (use Visio Flowchart or similar graphical editor to draw it).

b) Given the following tests, what is the statement coverage achieved (in %)? What is the decision coverage achieved (in %)?

Test 1: Cold drink

Test 2: Hot tea with milk and sugar

c) What additional tests will be needed to achieve 100% of both statement and decision coverage?

d) Prepare decision table for the above problem using Logic Gem, chose various options and comment on generated code in three languages your team is most familiar with.

e) Prepare test set to achieve 100% of the basis path coverage.

f) What would be a difference, if any, if you allow vending machine to select options in any order?

Problem set 2 - Scenario: If you are flying with an economy ticket, there is a possibility that you may get upgraded to business class, especially if you hold a gold card in the airline's frequent flyer program. If you don't hold a gold card, there is a possibility that you will get "bumped off' the flight if it is full and you check in late. The policy is specified using a flowchart below. Note that each box (i.e. statement) has been numbered.

The following three tests have already been run: t1) Gold card holder who gets upgraded to business class t2) non-gold holder who stays in economy, t3) a person who is bumped off the flight.

a) What additional tests would be needed to achieve 100% decision coverage?

b) Experiment with Logic Gem (define a complete DT) and select tests for basis path coverage

Problem set 3 - Program Control Flow Graph Coverage

Answer following questions for the code represented in Fig 4-46:

a) To achieve only statement coverage how many tests would be needed?

b) How many test cases are needed for basis path coverage (make the test plan)?

c) If we wanted to test this module to the level of multiple condition coverage (ignoring the possibility of short circuiting), how many test cases would be needed (demonstrate using DT)?

d) If this code were in a system that was subject to FAA DO/178B and was rated 1 Level A criticality, how many test cases would be needed for the first if statement alone (demonstrate using DT)?

Problem set 4 - (for teams of four or more students only): Testing Binary Search over real numbers

A Binary Search (in an array of real, floating point, numbers) function code is presented on Figure 4. Prepare a test plan to cover statements, decisions, basis bath etc. Experiment With code analysis/test coverage tools like EcIEMMA (in Eclipse) or whichever relevant ones you found useful (including on MS VS platform).

Problem set 5 - (for teams of five students only): Hexadecimal converter exercise

Which tool (s) if any you found useful in designing tests and assessing achieved test coverage.

Hexadecimal Converter Exercise

In figure 4-40, you'll find a C program that accepts a string with hexadecimal characters (among other unwanted characters). It ignores the other characters and converts the hexadecimal characters to a numeric representation. If a Ctrl-C is inputted, the last digit that was converted is removed from the buffet If you test with input strings "24ABd690BBCcc" and "ABCdef1234567890'; what level of coverage will you achieve?

What input strings could you add to achieve statement and branch cover-age? Would those be sufficient for testing this program?

Problem set 6 - (Bonus for all teams): Data Flow Graph Testing Practice and Comparison with DT

Use all the techniques and coverage criteria you learned so far, including Data Flow Testing.

Attachment:- STQA Exercises.rar

Reference no: EM131240644

Questions Cloud

Find a sufficient and necessary condition : A school has various student associations. The principal wants to hold a meeting, and she wants each student association to send one representative to this meeting. No student can participate at the meeting as a representative of more than one org..
How the groups labor force participation rate is affected : Use the labor-leisure choice model to illustrate graphically and then explain the change in the quantity of leisure desired. Be sure to explain how the group’s labor force participation rate is affected.
Calculate gain in compensating consumer surplus : James has a utility function given by , where is the amount of product 1 consumed per period and is the amount of product 2 consumed per period. Derive James’ Marshallian demand functions for and , expressed as functions of the prices of goods 1 and ..
Prove that the total number of gifts given is at most 6n : In any groups of seven guests, there are two guests who do know each other. At the end of the party, everyone gives a present to all the guests he or she knows. Prove that the total number of gifts given is at most 6n
Draw a control flowchart : Draw a control flowchart for this example using one statement for the selection of the type of a drink (use Visio Flowchart or similar graphical editor to draw it)
Determine an expression for the fundamental axial mode shape : Determine an expression for the fundamental axial frequency of the bar (ω rad/s). Your answer should contain the parameters λ, p, and L.
Advertising elasticity and cross-price elasticity of demand : Suppose the own price elasticity of demand for good X is -2, its income elasticity is 3, its advertising elasticity is 2, and the cross-price elasticity of demand between it and good Y is -4. Determine how much the consumption of this good will chang..
Rove that there will be segment with monochromatic vertices : We color each point of the n-dimensional plane having integer coordinates red or blue. Prove that there will be a segment with monochromatic vertices whose centroid has the same color as its two endpoints.
Find a proof that only considers 2n + 1 points : Try to find a proof that only considers 2n + 1 points. (Recall that the centroid of a set of n points in a (vector) space, viewed as the vectors v1, V2, ..... , vn is the point given by the vector (vx + v2 +..............+ vn)/n.)

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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