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

  Describes a function named insidecircle

Describes a function named insideCircle

  Compute the dollar amount of money in a piggy bank

Write down a detailed set of instructions, in English, to calculate the dollar amount of money in a piggy bank that contains h half-dollars, q quarters, n nickels, d dimes and p pennies.

  Design a combinational logic circuit

Design a combinational logic circuit that displays the hexadecimal value of a gray code input according to the specifications.

  Design program to keep track of a hardware store''s inventory

Write down a program to keep track of a hardware store's inventory. The sore sell various items. For each item in the store the following information is kept.

  Design the layout of users and domains

Design the layout of users, domains, trusted domains, anonymous users, etc for a start-up open source software company ABC.

  Designing a controller for new satellite

You are allocated to work on the project in order to design a controller for the new satellite. In order to save the money, your manager estimates you would reuse around 90% of software from one of two similar satellites the company built in the p..

  How an ipurchaseorder interface might be constructed

Briefly describe what an Interface is and how it can be used in an object-oriented program. Provide example pseudocode showing how an IPurchaseOrder Interface might be constructed.

  Prepare the flow diagram of the information and any control

develop the flow diagram of the information and any control elements needed to ensure proper access for the

  What is non-persistent http connection

What is  non-persistent HTTP connection

  How do you include a loop structure programming in python

Explain when we would use each. How do you include a ‘loop' structure programming in Python? How do you control a loop? What you found that was new and exciting that you plan to use personally.

  Show a class hierarchy in which the class employee inherits

Consider the class Employee. Given your knowledge of some common components of employees.

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