Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Programming: Body Mass Index - Dialog

Write a program that computes the user's Body Mass Index (BMI). BMI is a commonly used formula which shows the relationship of your weight for your height.

Tutorial Details:

Write a program that computes the user's Body Mass Index (BMI). BMI is a commonly used formula which shows the relationship of your weight for your height. It is calculated as weight in kilograms divided by the square of height in meters.

Specific requirements
Ask the user for their height. Convert it to a double.
Ask the user for their weight. Convert it to a double.
Use the formula BMI = weight / (height * height) to calculate the BMI.
Display the BMI number along with a message about their weight. These are the National Institute of Health official categories, but it might be more interesting to create your own messages.
Underweight for BMI < 18.5
Normal for BMI from 18.5 up to 25
Overweight for BMI from 25 to 30


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/examples-introductory/dialog/q-pr-bmi.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Programming: Body Mass Index - Dialog

View Tutorial:
Programming: Body Mass Index - Dialog

Related Tutorials:

Reading textual data: Fun with streams - JavaWorld - April 1999
Reading textual data: Fun with streams - JavaWorld - April 1999
 
Use a RandomAccessFile to building a low-level database - JavaWorld January 1999
Use a RandomAccessFile to building a low-level database - JavaWorld January 1999
 
Understanding JavaServer Pages Model 2 architecture - JavaWorld December 1999
Understanding JavaServer Pages Model 2 architecture - JavaWorld December 1999
 
JavaWorld - Java Tips index
JavaWorld - Java Tips index
 
JavaWorld December 1999
JavaWorld December 1999
 
Make room for JavaSpaces, Part 6 - JavaWorld October 2000
Make room for JavaSpaces, Part 6 - JavaWorld October 2000
 
Study guide Achieve strong performance with threads Part 1
Study guide Achieve strong performance with threads Part 1
 
Ilog JRules 4.0: Working by the rules
Ilog JRules 4.0: Working by the rules
 
XML glossary
XML glossary
 
Improving JSF by Dumping JSP
Improving JSF by Dumping JSP After a long wait and high expectations, JavaServer Faces (JSF) 1.0 was finally released on March 11, 2004. JSF introduces an event-driven component model for web application development, similar in spirit and function to t
 
The Trove collection classes
The Trove collection classes TheTrove, an open source Java collection package, provides an efficient alternative to the core Java collection classes, especially for implementing collections whose keys or values are primitive types. In this installment of
 
OIL (Objects in a Line)
OIL (Objects in a Lile) provides a queue API and its implementation which is required by many server applications which stores client requests permanently in order. OIL provides: Queue which provides sequential access. Index which provides random acce
 
Lucene in Action
Lucene in Action Lucene is a gem in the open-source world--a highly scalable, fast search engine. It delivers performance and is disarmingly easy to use. Lucene in Action is the authoritative guide to Lucene. It describes how to index your data, includin
 
USB FAQ
FAQ topics include recommended USB patches for the Solaris OS, the USBA 1.0 Framework, libusb support, and more.
 
Using Lucene With OJB
Brian McCallister looks at the Lucene search engine and shows us how to index and retrieve objects from a sample Student application.
 
Running Lucene Search on WebLogic Portal 8.1
Lucene comes with two main services available: indexing and searching. The indexing tasks are done independently from the search tasks. Both the index and search services are available so that developers can extend them to meet their needs.
 
Adding search to your applications
The Lucene search engine is an open source, Jakarta project used to build and search indexes. Lucene can index any text-based information you like and then find it later based on various search criteria.
 
WAP Toolkits Motorola - Mobile ADK 1.1 Nokia - WAP Toolkit
WAP Toolkits Motorola - Mobile ADK 1.1 Nokia - WAP Toolkit Tutorial WAP Toolkits T o develop any WAP application you have to download software essential for development. Although you can write and test your codes through our site for learning
 
DB Solo - Database development and management tool
DB Solo is a powerful database development and management tool for developers and DBAs. DB Solo has an intuitive user interface that allows you to explore and manage your database objects as well as execute your own ad-hoc queries.
 
Sun Studio 10 Documentation Online
Full documentation for the Sun Studio 10 compilers and tools is now available on the Sun Developer's Portal.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.