Java application that calculates the body mass index

Assignment Help JAVA Programming
Reference no: EM13541663

Write a Java application that calculates and displays the body mass index (BMI) for N people. N should be declared as a constant and should be equal to the largest digit of your student id number (e.g. if your student id is s0705544 then N should be equal to 7). Assume N=4, if the largest digit of your student id number is less than 4. The BMI is a measure of relative weight based on a person's mass and height.

The application should ask the user to enter the name, height and mass of his or her body. Then program will calculate this person's BMI, which is defined as below,

BMI=mass/(height/100)2

where mass is the body's weight to the nearest kilogram, and height is the body's height in the unit of centimetre. Both of mass and height are assumed to be integer numbers here.

The application should display the body mass index (to two digits of decimals) for each person and the summary of all people that we enter. This also includes the maximum value of BMI and a simple bar chart to show how many people's BMI less than 18.5 (a threshold value that indicates whether this person is in underweight). These requirements are can shown in figures 1 and 2 as below (see next page). Your program should display similar screen images when it runs. The application should be user-friendly by displaying appropriate welcome, exit and error message. The application can use the following classes and methods (but you can use different classes or methods if your program works OK; the solution program is not unique).

Reference no: EM13541663

Questions Cloud

As a bacterium swims through water it propels : As a bacterium swims through water it propels itself with its flagella so as to overcome the frictional drag forces and move at, more or less, constant velocity of 100 micrometers/s for periods of time. If the frictional drag force on a bacterium is ..
Calculate the weight of the olive oil : a large rectangular tub is filled to a depth of 2.60 m with olive oil, which has density 915 kg/m^3. If the tub has the length 5.00m and width 3.00 m, calculate the weight of the olive oil
Explain the reaction bro3- + 5br-+ 6h+ ? 3br2 + 3h2o : For the reaction BrO3- + 5Br-+ 6H+ ? 3Br2 + 3H2O at a particular time, -?[BrO3-]/?t = 1.5 ? 10-2 M/s. What is -?[Br-]/?t at the same instant
Find the tension in the guitar string : A guitar string is being restrung with a string having a diameter of 1.4 mm and a length of 0.82 m when no tension is applied. If the string has a Young's modulus of 1.4 x 10^11 N/m^2 and is tightened by wrapping it three times around a peg with a 2...
Java application that calculates the body mass index : Write a Java application that calculates and displays the body mass index (BMI) for N people
How many grams of dry nh4cl needed in solution of ammonia : How many grams of dry NH4Cl need to be added to 2.00 L of a 0.600 M solution of ammonia, NH3, to prepare a buffer solution that has a pH of 8.89. Kb for ammonia is 1.8 X10^-5.
Determine what is the minimum number of horses required : In 1656, the Burgmeister (mayor) of the town of Magdeburg, Germany, Otto Von Guericke, carried out a dramatic demonstration of the effect resulting from evacuating air from a container. what is the minimum number of horses required
How much will the knights femur bones be stretched : A medieval knight is "racked", stretching his body with a force of 1200 N. Using the data in the previous problem, by how much will the knight's femur bones be stretched?
Find the maximum possible distance before the wire breaks : suppose the length L of the uniform bar is 3.00 m and its weight is 230 N. Also, let the block's weight W = 350 N and angle ? = 30°. find the maximum possible distance x before the wire breaks

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a complete java application that meets these

create a complete java application that meets these requirements1. the program has an opening comments section using

  Java program by array

Write a program that reads in a file that contains one integer per line. Each integer represents one location in the image. Assume that there are 64 rows and 64 columns in the image

  It inherits the functionality of super class

It inherits the functionality of super class Package and contains an additional data member representing an additional fee per ounce charged for overnight-delivery service.

  Using joptionpanes to handle your input and output

Using JOptionPanes to handle your input and output, produce a Java program which, given three sides of a triangle, determines whether the triangle is.

  Prepare a basic code to do the followingwrite a program

prepare a basic code to do the following.write a program that shows the current time and date evaluated from the

  Java enumeration lettergrade represent letter grades

Write a java enumeration LetterGrade that represents letter grades A through F, including plus and minus grades. Define a private instance variable holding a boolean value.

  Explain we have to make a project in java

We have to make a project in java . This is a small deskstop application no specifications given so far . The CD store has CD games and music we can rent a cd or we can buy . This is all we need to develop.

  Write a method called hash midpoint

Write a method called hasMidpoint that accepts three integers as parameters and returns 'true' if one of the integers is the midpoint between the other two integers; that is to is if one integer is exactly between the two others. The method should re..

  Please write the code in java nbsprecursionimplement a

please write the code in java nbsprecursionimplement a subsetgenerator that generates all subsets of the characters of

  Problem on java progamming

Which parts of the assignment were you not able to complete fully? For each, explain why you were unable to complete this part and what steps you took to attempt to complete it.

  Compare and contrast the safavid and ottoman empires

How did the creation of the Janissary system shape the development of the Ottoman Empire? What precipitated the decline of the Ottoman Empire? Compare and contrast the Safavid and Ottoman empires?

  Java program to compute invoice for client

You need a java program to compute the invoice for client and then print out invoice to the screen. The consulting rate is $200 per hour.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd