Question
You work for a large flooring company that sells hard wood and carpeted floors. Salesmen go out to people's home to sell them flooring. You
You work for a large flooring company that sells hard wood and carpeted floors. Salesmen go out to people\'s home to sell them flooring. You created a program that allows the salesmen to compute the area of a room. Salesmen typically carry laptops on each sales call.
The program is designed with two files: FloorMeasuringTool.java and ShapeAreas.java. FloorMeasuringTool.java is the user interface. ShapeAreas.java contains code for all of the different types of area calculations.
Your Assignment: Your assignment is to take your test suite from the previous assignment and automate it in JUnit. Before submitting the assignment read the feedback from the previous assignment and make any changes as needed
1.2 100% Code Coverage Test Cases1.2.1 Test Case 1
Test case name: Testing the area value for C, type shape.
Method being tested: oneParameter(String a, float b)
Short description: This method returns the area for the hard wood of different type types of shapes.
Input data to the constructor or method: passing two parameters as (C ,20.0)
Expected Results: 1256.56
1.2.2 Test Case 2
Test case name: Testing the area value for S type shape.
Method being tested: oneParameter(String a, float b)
Short description: This method returns the area for the hard wood of different types of shapes.
Input data to the constructor or method: passing two parameters as (S,30.0)
Expected Results: 800.00
1.2.3 Test Case 3
Test case name: Testing the area value for A type shape.
Method being tested: twoParameter(String a, float b, float c)
Short description: This method returns the area for the hard wood and of different types of shapes.
Input data to the constructor or method: passing two parameters as (A,20.0,30.0)
Expected Results: 600.00
1.2.4 Test Case 4
Test case name: Testing the area value for T type shape.
Method being tested: twoParameter(String a, float b, float c)
Short description: This method returns the area for the hard wood and of different types of shapes.
Input data to the constructor or method: passing two parameters as (T,20.0,30.0)
Expected Results: 300.00
1.2.5 Test Case 5
Test case name: Testing the area value for P type of shapes.
Method being tested: twoParameter(String a, float b, float c)
Short description: This method returns the area for the hard wood and of different types of shapes.
Input data to the constructor or method: passing two parameters as (P,20.0,30.0)
Expected Results: -
2. Defects:2.1 Description:
Boundary analysis is a technique used in Black-Box testing, in this type of testing, we check the boundary values of the program or software under studied. It means that to check at what values the program required to perform its functionality. Conditions and constraints often defined in this.
In this program the only boundary values are type of shapes which are A, S, T,C. The other constraint is the float values we can pass to the methods of this program. Any of the other values expect these values will be false. The program will return -1.
2.2 Test Cases
Test case 1: the shape of type B with value 30.0.(invalid)
Test case 2: the shape of type C with value 20.00. (invalid)
Test case 3: the shape of type A and values are 30.00 and 20.00.(valid)
Test case 4: the shape of type T with value 30.0.(invalid)
Test case 5: the shape of type S with value 20.00.(valid)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started