COIT20245: Java Console BMI Calculator Application & Test Plan

Verified

Added on  2023/06/14

|12
|879
|414
Practical Assignment
AI Summary
This document provides a solution to a practical assignment involving the creation of a Java console application designed to calculate and classify Body Mass Index (BMI) for a fixed number of individuals. The application takes height and weight inputs, calculates the BMI, and categorizes it into one of eight levels, ranging from 'Very severely underweight' to 'Obese Class III'. The solution includes a test plan that employs verification and validation testing, black-box testing, unit testing, and integration testing to ensure the program's functionality and accuracy. The document also presents testing results for various input scenarios, including valid data, boundary cases, and invalid inputs, demonstrating the program's ability to handle different situations. Finally, the application generates a summary report containing the lowest, highest, and average BMI values, along with the count of individuals falling into normal and higher-than-normal BMI categories.
Document Page
Running head: THE BMI CALCULATOR
The BMI Calculator
Name of the student:
Name of the University:
Author note:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
THE BMI CALCULATOR
Table of Contents
Test Plan..........................................................................................................................................3
Testing.............................................................................................................................................4
Document Page
THE BMI CALCULATOR
Test Plan
Firstly, a Verification and Validation Testing must be conducted to make sure that the
program performs as per the requirements. The testing will be carried against all sorts of data
that the program wishes to encounter. This type of testing can be widely grouped under Black
Box Testing.
Furthermore, since this project has several individual components to implement, the
testing must be carried out individually on each part. This testing technique is commonly known
as Unit Testing. The individual methods will be separately executed and tested with a variety of
data to test its strengths and cape out its weaknesses. Finally, an Integration testing shall be
carried out by integrating all the individual components together and carrying out a thorough test
of connectivity. Both of these testing techniques can be camped under White Box Testing.
Document Page
THE BMI CALCULATOR
Testing
Below is the testing results carried out for 10 instances with varied forms of input.
Test Case Input and Expected Outcome Actual Output (Screenshots)
1. To test if
the program
correctly
generates and
displays all
BMI output
(Tested with
3 inputs).
Height of person 1:
1.82
Weight of person 1:
60
BMI for person 1: 18.11 which is
Underweight.
Height of person 2:
1.82
Weight of person 2:
100
BMI for person 2: 30.19 which is
Obese Class I (Moderately obese).
Height of person 3:
1.82
Weight of person 3:
80
BMI for person 3: 24.15 which is
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
THE BMI CALCULATOR
Normal (Healthy weight).
SUMMARY
Highest BMI: 30.19
Lowest BMI: 18.11
Average BMI: 24.15
Number of people with low BMI: 1
Number of people with normal
BMI: 1
Number of people with high BMI:
1
Document Page
THE BMI CALCULATOR
2. To test if
the program
can take
multiple
inputs upto 4
terms.
Height of person 1(m):
1.6
Weight of person 1(kg):
85
BMI for person 1: 33.2 which is
Obese Class I (Moderately obese).
Height of person 2(m):
2.5
Weight of person 2(kg):
90
BMI for person 2: 14.4 which is
Very severely underweight.
Height of person 3(m):
1.6
Weight of person 3(kg):
75
BMI for person 3: 29.3 which is
Overweight.
Height of person 4(m):
2
Document Page
THE BMI CALCULATOR
Weight of person 4(kg):
80.5
BMI for person 4: 20.12 which is
Normal (Healthy weight).
3. To test if
the program
can generate
the summary
properly.
Height of person 1:
1.6
Weight of person 1
85
BMI for person 1: 33.2 which is
Obese Class I (Moderately obese).
Height of person 2
2.5
Weight of person 2
76
BMI for person 2: 12.16 which is
Very severely underweight.
Height of person 3
1.4
Weight of person 3
85.6
BMI for person 3: 43.67 which is
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
THE BMI CALCULATOR
Obese Class III (Very severely
obese).
Height of person 4
1.85
Weight of person 4
82
BMI for person 4: 23.96 which is
Normal (Healthy weight).
Summary
Highest BMI: 43.67
Lowest BMI: 12.16
Average BMI: 28.25
Number of people with low BMI: 1
Number of people with normal
BMI: 1
Number of people with high BMI:
2
Document Page
THE BMI CALCULATOR
4. To start
with unit
testing, test if
the Input
module
program can
handle
negative
inputs.
Height of person 1(m):
-1.5
Height cannot be less than or equal
to ZERO! Try again
Height of person 1(m):
1.5
Weight of person 1(kg):
-100
Weight cannot be less than or equal
to ZERO! Try again
Height of person 1(m):
1.5
Weight of person 1(kg):
100
5. To test if
the BMI is
generated
properly
when
accessed
individually
Height Input: 1.6
Weight Input: 85
Output: 33.2
Document Page
THE BMI CALCULATOR
with decimal
values for
height and
weight.
6. To test if
the BMI
Classification
is well sorted
out based on
the 8 parts.
Input-1: 15.5
Output: Severely Underweight
Input-1: 20.6
Output: Normal (healthy)
Input-1: 35
Output: Obese class 1
Input-1: 41.80
Output: Obese class 3
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
THE BMI CALCULATOR
7. To test if
the BMI
classification
returns
proper values
in the 3
classification
stage.
Input1: 15.6
Output: Low
Input2: 24
Output: normal
Document Page
THE BMI CALCULATOR
8. To test if
the system
can handle
wrong
character
inputs.
chevron_up_icon
1 out of 12
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]