5 I 6. Due date: 12-March Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight, normal, overweight or obese, based on it following table from United States Centers for Disease Control: BMI Weight Status Underweight Normal Below 18.5 18.5-24.9 25.0-29.9 Overweight 30.0 and above Obese To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula: 703 wt lb Ht in Prompt the user to enter weight in pounds and height in inches. Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of the cylinder's color. The program input is a character representing the observed color of the cylinder: Tor "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as follows: Orange ammonia Brown carbon monoxide Yellow hydrogen Green Il eubbcollab.com is sharing your screen. Stop sharing Hide

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question
Font
Paragraph
Styles
2
Due date: 12-March
Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight,
normal, overweight or obese, based on it following table from United States Centers for Disease Control:
BMI
Weight Status
Underweight
Below 18.5
18.5-24.9
Normal
25.0-29.9
Overweight
30.0 and above
Obese
To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula:
703 wt lb
Ht in
Prompt the user to enter weight in pounds and height in inches.
Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of
the cylinder's color. The program input is a character representing the observed color of the cylinder:
or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as
follows:
Orange
ammonia
Brown
carbon monoxide
Yellow
hydrogen
Green
I| eu.bbcollab.com is sharing your screen.
Stop sharing
Hide
nglish (United States)
Transcribed Image Text:Font Paragraph Styles 2 Due date: 12-March Q1. Write a program that calculates the users body mass index(BMI) and categorizes it as underweight, normal, overweight or obese, based on it following table from United States Centers for Disease Control: BMI Weight Status Underweight Below 18.5 18.5-24.9 Normal 25.0-29.9 Overweight 30.0 and above Obese To calculate BMI based on weight in pounds(wt Ib) and height in inches(ht_in), use this formula: 703 wt lb Ht in Prompt the user to enter weight in pounds and height in inches. Q2. Write a program that reports the contents of a compressed gas cylinder based on the first letter of the cylinder's color. The program input is a character representing the observed color of the cylinder: or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as follows: Orange ammonia Brown carbon monoxide Yellow hydrogen Green I| eu.bbcollab.com is sharing your screen. Stop sharing Hide nglish (United States)
日、
Q Search
Font
Paragraph
Styles
2 3.. I
To calculate BMI based on weight in pounds(wt lb) and height in inches(ht_in), use this formula:
703 wt lb
Ht_in
Prompt the user to enter weight in pounds and height in inches.
Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter of
the cylinder's color. The program input is a character representing the observed color of the cylinder:
"Y" or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as
follows:
Orange
ammonia
Brown
carbon monoxide
Yellow
hydrogen
Green
oxygen
Your program should respond to input of a letter other than the first letters of the given colors with the
message, Contents unknown.(Use switch case)
Transcribed Image Text:日、 Q Search Font Paragraph Styles 2 3.. I To calculate BMI based on weight in pounds(wt lb) and height in inches(ht_in), use this formula: 703 wt lb Ht_in Prompt the user to enter weight in pounds and height in inches. Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter of the cylinder's color. The program input is a character representing the observed color of the cylinder: "Y" or "y" for yellow, "O" or "o" for orange, and so on. Cylinder colors and associated contents are as follows: Orange ammonia Brown carbon monoxide Yellow hydrogen Green oxygen Your program should respond to input of a letter other than the first letters of the given colors with the message, Contents unknown.(Use switch case)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 7 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr