A vending machine dispenses either hot or cold drinks. If you choose a hot drink

A vending machine dispenses either hot or cold drinks. If you choose a hot drink (e.g. tea orcoffee), it asks if you want milk (and adds milk if required), then it asks if you want sugar (andadds sugar if required), then your drink is dispensed.a. Draw a control flow diagram for this example. (Hint: regard the selection of the type ofdrink as one statement.)b. Given the following tests, what is the statement coverage achieved?c. What is the decision coverage achieved?? Test 1: Cold drink? Test 2: Hot drink with milk and sugarc. What additional tests would be needed to achieve 100% statement coverage?d. What additional tests would be needed to achieve 100% decision coverage?

You may also like