Problem Statement
Given the following JSON data
[{"Gender": "Male", "HeightCm": 171, "WeightKg": 96 }, { "Gender": "Male", "HeightCm": 161, "WeightKg": 85 }, { "Gender": "Male", "HeightCm": 180, "WeightKg": 77 }, { "Gender": "Female", "HeightCm": 166,"WeightKg": 62}, {"Gender": "Female", "HeightCm": 150, "WeightKg": 70}, {"Gender": "Female","HeightCm": 167, "WeightKg": 82}
as the input with weight and height parameters of a person, we have to perform the following:
Calculate the BMI (Body Mass Index) using Formula 1, BMI Category, and Health risk from Table 1 of the person and add them as 3 new columns
Count the total number of overweight people using ranges in the column BMI Category of Table 1, check this is consistent programmatically, and add any other observations in the documentation
Create build, tests to make sure the code is working as expected and this can be added to an automation build/test/deployment pipeline
Formula 1 - BMI
BMI(kg/m ) = mass(kg) / height(m)
The BMI (Body Mass Index) in (kg/m2 ) is equal to the weight in kilograms (kg) divided
by your height in meters squared (m)2. For example, if you are 175cm
(1.75m) in height and 75kg in weight, you can calculate your BMI as follows: 75kg /
(1.75m2) = 24.49kg/m2
Table 1 - BMI Category and the Health Risk
BMI Category
Underweight, Normal weight, Overweight, Moderately obese, Severely obese, Very
severely obese Challenge
BMI Range (kg/m2)
18.4 and below
18.5 - 24.9
25 - 29.9
30 - 34.9
35 - 39.9
40 and above
Health risk
1) Write a solid production-grade typescript/javascript Program to solve this
problem, imagine this will be used in-product for 1 Lac patients. We are only interested
in a standalone backend application, we are NOT expecting a UI, webpage, frontend,
Mobile App, microsite, etc. We want to see what optimal solution you come up with to
scale for larger JSON data and perform calculations quickly and write the output
efficiently. Feel free to explore and use the standard node libraries or any open-source
node modules
2) Automate the setup, build, test, package, and run using your favorite tools
3) Check in the documentation, configuration, code, and tests into Github
Requirements :
● 25% Working code and node/typescript/javascript Programming Knowledge and clean code, reuse
● 25% Problem Analysis and Solution Approach
● 25% Build and Test Automation Approach
● 25% Originality, we deduct marks or reject any projects with directly copied or plagiarized code
For Solution of this assignment or any such assignment contact Codersarts.
Codersarts is top rated Programming assignment help provider
Comentarios