Please only respond if you can write in Visual Basic! Create a project IN VISUAL BASIC titled Lab4_BMR that calculates t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please only respond if you can write in Visual Basic! Create a project IN VISUAL BASIC titled Lab4_BMR that calculates t

Post by answerhappygod »

Please only respond if you can write in VisualBasic!
Create a project IN VISUAL BASIC titled Lab4_BMR that calculatesthe person's Basal Metabolic Rate - the number ofcalories per day a person's body needs to function. Then, on thebasis of calculated BMR, your programshould output how many bagels a person can consume. A medium-sizedbagel contains 354 calories. TheBMR formula is as follows:• for women: 655 + (4.3 x weight in pounds) + (4.7 x height ininches) - (4.7 x age in years)• for men: 66 + (6.3 x weight in pounds) + (12.9 x height ininches) - (6.8 x age in years)Depending on gender, BMR should be calculated by:
Part1: Subroutines bmrWomen_Sub() and bmrMen_Sub() that both accepta proper number ofparameters "weight in pounds", "height in inches", and "age inyears" and return the BMR. Note that theBMR has a fractional part.The main subroutine should prompt the user for her gender, weight,height (feet and inches), and age;compute the BMR and the number of bagels that can be consumed perday, and then output both theBMR and the number of bagels.The number of bagels is BMR divided by the number of calories in abagel. A fractional number of bagelscan be dropped. The number of calories per bagel (354) should beput in a named constant.Based on the user's gender, the caller subroutine (most likely anevent click of a button) should decidewhether to invoke bmrWomen_Sub() or bmrMen_Sub(). The user shouldinput her height in feet andinches. The caller subroutine should compute the total number ofinches (one foot has 12 inches)
Part2: Reimplement the subroutines bmrWomen_Sub() andbmrMen_Sub() as FunctionsbmrWomen_Function() and bmrMen_Function () .That is, your program should contain two procedures bmrWomen_Sub()and bmrMen_Sub() and twofunctions bmrWomen_Function() and bmrMen_Function () that serve thesame purposes.NOTE: You are expected to make the input and output within thecaller subroutine.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply