Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 942 Bytes

File metadata and controls

15 lines (13 loc) · 942 Bytes

MedicalAnalyser

Exercise 16

Download the C# project MedicalAnalyser from the class website. This project contains a class called BodyAnalyser, with a completed method CalculateBMI, plus an unfinished method AnalyseBMI. BMI stands for “Body Mass Index” (Google it ). The unfinished method does compile, but it is not implemented correctly! Your job is to correctly implement the method AnalyseBMI. The specification is as follows:

  • If the BMI is less than 15, it must return “You are way too skinny!” 
  • If the BMI is between 15 and 22, it must return “You are a bit skinny” 
  • If the BMI is between 22 and 28, it must return “You are just fine!” 
  • If the BMI is between 28 and 35, it must return “You are a bit overweight!” 
  • If the BMI is more than 35, it must return “You are way too fat!”
As always, remember to write some code that tests your work.