A student was arrested for drunk driving. There was some confusion during the arrest,
which lead to the student's blood not being tested for alcohol level. The student was taken
to the police station and at the station he was tested using an A.L.T. program.
The A.L.T. program was developed by a private company and causes a lot of
problems. You are requested to assist the police in writing a new program to test
blood alcohol levels.
The student is already at the police station and the police want to use your program,
therefore you have exactly 60 minutes to complete this program.
Alcohol levels are tested in the manner that will be explained below. (Please note that
these formulas are inaccurate formulas and should not be used in real life situations)
Your program should calculate and return a person’s blood alcohol level (BAL) as
follows:
For persons weighing between 0 kg and 50 kg, the formula is:
Body composition= number of drinks/ 66% of the body weight,
where
BAL= Body composition - (Body composition x munutes)

For persons weighing between 51 kg and 100 kg, the formula is:
Body composition= number of drinks/ 75% of the body weight,
where
BAL= Body composition - (Body composition x munutes)

The BAL formula stays the same as above

For persons weighing between 101 kg and 170 kg, the formula is:
Body composition= number of drinks/ 84% of the body weight,
where
BAL= Body composition - (Body composition x munutes)

The BAL formula stays the same as above

However, if a person weighs more than 170 kg, the person cannot fit into a vehicle which means
that the person could not be a driver.
Your program must allow the officer to enter the number of alcoholic drinks the suspect drunk,
weight of the suspect (in Pounds) as well as the time that elapsed after the incident (this time
must be expressed in minutes). Note that the above formulas use Kilograms for the body
weight

Recommended Answers

All 2 Replies

Is there a question to go with this? Are you seeking assistance?

Try it yourself first and post you program and question if its not working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.