Part 1
Select any tool that provides statement and decision code coverage. Utilizing the VendingMachine.java code given to you, develop a set of test cases for your code based on the following requirements:
Takes in an integer input
Allows users to select between three products: Candy (20 cents), Coke (25 cents), Coffee (45 cents)
Returns the selected product and any remaining change
If there is not enough money to buy the product, displays the amount necessary to buy the product and other products to purchase.
Execute the program with your test cases and observe the code coverage of your test cases.
The goal is to reach 100% in statement and 90% in decision coverage.
Please submit the following:
Description of the tool used and the types of coverage it provides
Set of test cases
Screenshot showing the coverage achieved for the test cases developed
Your evaluation of the tool’s usefulness
Part 2
Select any static source code analysis tool. The StaticAnalysis.java code given to you contains two different data flow anomalies. Execute the tool on StaticAnalysis.java and identify what the two data flow anomalies are. The inputs are:
the weight of the package as an integer
the length of the package as an integer
the type of product as a String
Please submit the following
Description of the tool used and the types of analysis it provides
Description of the two data flow anomalies
Screenshot showing the analysis performed
Your evaluation of the tool’s usefulness
Assessment
Your request will be scored based on the following criterion:
Part 1
Description of the tool used and the types of coverage it provides
Set of test cases
Screenshot showing the coverage achieved for the test cases developed
Evaluation of the tool’s usefulness
Part 2
Description of the tool used and the types of analysis it provides
Description of the two date flow anomalies
Screenshot showing the analysis performed
Evaluation of the tool’s usefulness