Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View BMI command gives nonsensical data when biometric data is not set #1031

Open
nus-pe-bot opened this issue Nov 11, 2022 · 1 comment
Open

Comments

@nus-pe-bot
Copy link

nus-pe-bot commented Nov 11, 2022

The "view bmi" command does not check whether a height has actually been input by the user before performing the calculation for BMI, leading to strange output:

-------------------------------------------------------------------------------
add weight /1 /1 /12-12-0001
-------------------------------------------------------------------------------
Weight: 1kg
Fat percentage: 1%
Date: 12-12-0001
 Weight and fat percentage are recorded successfully
-------------------------------------------------------------------------------
view biometrics
-------------------------------------------------------------------------------
Biometrics:
Biometrics are not set
-------------------------------------------------------------------------------
view bmi
-------------------------------------------------------------------------------
Your current BMI is : 9.223372036854776E16
Re-check your height and weight inputs. Your BMI is astonishingly high.
-------------------------------------------------------------------------------

To allay user confusion, it is best to detect this particular case and alert the user accordingly.


[original: nus-cs2113-AY2223S1/pe-interim#1022] [original labels: severity.Low type.FunctionalityBug]
@gaoyunfan
Copy link
Contributor

Team's Response

No details provided by team.

Duplicate status (if any):

--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants