Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DEVELOP CODE IN C++ AND THE FLOWCHART Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The
DEVELOP CODE IN C++ AND THE FLOWCHART
Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI is defined as the body mass divided by the square of the body height and is universally expressed in units o kg/m, resulting from mass in kilograms and height in meters. The BMI may also be determined using Table 1 or chart which displays BMI as a function of mass and height using contour lines or colors for different BMI categories, and which may use other units of measurement (converted to metric units for the calculation). The BMI is a convenient rule of thumb used to broadly categorize a person as underweight, normal weight, overweight, or obese based on tissue mass (muscle, fat, and bone) and height. Your job as a programmer is to develop an application using C++ language for BMI calculation. Your program must be able to calculate BMI when user enter the unit for mass in kg and height in meter or mass in pounds and height in inch. The illustration of the BMI calculation is shown in Figure 2. Table 1. BMI Table BMI Height (inches) 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Body Weight (pounds) 91 96 100 105 110 115 119 124 129 134 138 143 148 153 158 162 167 94 99 104 109 114 119 124 128 133 138 143 148 153 158 163 168 173 97 102 107 112 118 123 128 133 138 143 148 153 158 163 168 174 179 100 106 111 116 122 127 132 137 143 148 153 158 164 169 174 180 185 104 109 115 120 126 131 136 142 147 153 158 164 169 175 180 186 191 107 113 118 124 130 135 141 146 152 158 163 169 175 180 186 191 197 110 116 122 128 134 140 145 151 157 163 169 174 180 186 192 197 204 114 120 126 132 138 144 150 156 162 168 174 180 186 192 198 204 210 118 124 130 136 142 148 155 161 167 173 179 186 192 198 204 210 216 121 127 134 140 146 153 159 166 172 178 185 191 198 204 211 217 223 125 131 138 151 158 164 171 177 184 190 197 203 210 216 223 230 128 135 142 149 155 162 169 176 182 189 196 203 209 216 223 230 236 132 139 146 153 160 167 174 181 188 195 202 209 216 222 229 236 243 136 143 150 157 165 172 179 186 193 200 208 215 222 229 236 243 250 140 147 154 162 169 177 191 199 213 221 228 235 242 250 258 144 151 159 166 174 189 197 204 212 219 227 235 242 250 257 265 148 155 163 171 186 194 202 210 225 241 249 256 264 152 160 168 176 184 192 200 208 216 224 232 240 248 256 264 272 279 156 164 172 180 189 197 205 213 221 230 238 246 254 263 271 279 287 184 206 182 179 218 233 272 BMI Height (inches) 58 59 60 61 62 63 65 66 67 68 69 70 71 72 73 74 75 76 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 Body Weight (pounds) 172 177 181 186 191 196 201 205 210 215 220 224 229 234 239 244 248 253 258 178 183 188 193 198 203 208 212 217 222 227 232 237 242 247 252 257 262 267 184 189 194 199 204 209 215 220 225 230 235 240 245 250 255 261 266 271 276 190 195 201 206 211 217 222 227 232 238 243 248 254 259 264 269 275 280 285 196 202 207 213 218 224 229 235 240 246 251 256 262 267 273 278 284 289 295 203 208 214 220 225 231 237 242 248 254 259 265 270 278 282 287 293 299 304 209 215 221 227 232 238 244 250 256 262 267 273 279 285 291 296 302 308 314 216 222 228 234 240 246 252 258 264 270 276 282 288 294 300 306 312 318 324 223 229 235 241 247 253 260 266 272 278 284 291 297 303 309 315 322 328 334 230 236 242 249 255 261 268 274 280 287 293 299 306 312 319 325 331 338 344 236 243 249 256 262 269 276 282 289 295 302 308 315 322 328 335 341 348 354 243 250 257 263 270 277 284 291 297 304 311 318 324 331 338 345 351 358 365 250 257 264 271 278 285 292 299 306 313 320 327 334 341 348 355 362 369 376 257 265 272 279 286 293 301 308 315 322 329 338 343 351 358 365 372 379 386 265 272 279 287 294 302 309 316 324 331 338 346 353 361 368 375 383 390 397 272 280 288 295 302 310 318 325 333 340 348 355 363 371 378 386 393 401 408 280 287 295 303 311 319 326 334 342 350 358 365 373 381 389 396 404 412 420 287 295 303 311 319 327 335 343 351 359 367 375 383 391 399 407 415 423 431 295 304 312 320 328 336 344 353 361 369 377 385 394 402 410 418 426 435 443 Items cin, cout (4 statements or more) Pre-processor: iostream, cmath, etc. Readability Variables Comments Proper indentations Rubrics 2 marks 2 pre-processors and more: 1 mark 1 pre-processor only: 0 mark Easy to read: 1 mark Untidy source code: 0.5 mark Poorly organized: 0 mark Good names: 1 mark Appropriate names: 0.5 mark Bad variable name: 0 mark Comments are properly placed: 1 mark Unnecessary comment/very minimum: 0.5 mark No comment at all: 0 mark Yes: 1 mark No: 0 mark 4 statements involve: 2 marks 2 statements involve: 1 mark No statement at all: 0 mark 4 statements involve: 2 marks 2 statements involve: 1 mark No statement at all: 0 mark Yes: 2 marks Yes, but with run-time/logic error: 1 mark No: -2 mark Precisely aligned: 2 marks Some misaligned: 1 mark Unaligned: 0 mark Decision (if..else, switch..case) (4 statements or more) Repetition/Loops (while, do..while, for, break, continue) (4 statements or more) Could the program be executed? Displayed Outputs
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