Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 The BMI (Body Mass Index) is defined as the body mass divided by the square of the body height and is universally expressed
Question 1 The BMI (Body Mass Index) is defined as the body mass divided by the square of the body height and is universally expressed in units of kg/m2, resulting from mass in kilograms and height in meters. (a) Write a BMI class to contain main() method and other two methods, namely bmi_cal() and bmi_class(). (4 marks) (6) Write a bmi_cal() method to calculate the BMI value using the following equation: BMI = Weight (kg)/Height(m)2 (5 marks) (c) Write a bmi_class() method to classify the BMI status into underweight, normal, overweight, or obese based on the information presented in Table 1. Table 1: BMI Classification Table BMI Status 16-19 Underweight 20-24 Normal 25-29 Overweight 30 and above Obese (10 marks) (d) Call bmi_cal() and bmi_class()methods though main() and print the results. (6 marks) [25 Mark]
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