Question
Method 4: A method to calculate the current BAC. This method will: o Have 5 parameters: weight in pounds volume distribution to use metabolic rate
Method 4: A method to calculate the current BAC. This method will: o Have 5 parameters: weight in pounds volume distribution to use metabolic rate to use number of drinks consumed number of hours elapsed o Define and use two local (non-static) constants, that contain the values for: the number of grams in one pound (453.592) the grams of alcohol in one drink (14)
Reminder: CS210 coding standards require: Local constants will be declared at the top of the method in which they are used, before any other executable statements or variable declarations. o Convert the weight to grams. o Calculate the grams of alcohol in the drinks consumed. o Compute the initial BAC using the Widmark formula on page 1. o Compute the current BAC using the last formula on page 1. o Return a double value: the current BAC.
JAVA PROGRAMMING
Problem Summary A person would like to know how to determine his/her blood alcohol content (BAC). In Colorado, the legal driving limit is 0.08. Blood alcohol content (BAC) is usually expressed as a percentage of ethanol in the blood in units of mass of alcohol per volume of blood or mass of alcohol per mass of blood. So, for example, in North America a BAC of 0.1 (0.1% or one tenth of one percent) means that there are 0.10 g of alcohol for every dL (docilikx) oblood. A standard American drink contains 0.5 US fl oz (15 ml) of alcohol by volume, and is equivalent to: 12 oz of beer (5% alcohol) 5 oz of wine (12% alcohol) 1.5 oz shot of 80 proof liquor (40% alcohol) This means that there are 14 grams of alcohol in one standard American drink. Back in 1932, Swedish scientist Eric Widmark established the following formula for determining a person's initial BAC is: Alcohol consumed (in grams) weight (in grams) x Volume distribution (by gender) BAC = x 100 In the original formulas, the volume distributions of alcohol in the blood by gender were fixed values. One value (0.68) was used for males, and another value (0.55) was used for females However, in 1986, English chemist Robert Forrest came up with a better way to calculate the volume distribution (by gender), taking the person's weight and height into accountStep 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