Calculates and displays the body mass index

Assignment Help Basic Computer Science
Reference no: EM13936383

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

Reference no: EM13936383

Questions Cloud

Template that computes and displays the absolute value : Create a program that uses this function template, passing in two arguments of type int, float, and double variable.
What would the composite standard deviation be for the risks : Given the following standard deviations of risk type 1 and 2 of $200,000 and $300,000 along with their associated correlations shown below, what would the composite standard deviation be for these risks?
Explain conflict between legislative and executive branches : Consider how that conflict has been resolved to allow the president to negotiate free trade agreements. Explain the conflict between the legislative and executive branches in negotiating free trade agreements
Discuss company marketing-business communication strategy : application to of best practice model to discuss current company marketing and business communication strategy -summary
Calculates and displays the body mass index : 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 ..
Create ifstream and ofstream objects called infile n outfile : Create ifstream and ofstream objects called "infile" and "outfile" respectively. Include 4 functions for initializing, copying text, counting, and writing the results to a file, respectively.
How might you get a handle on customer reaction to strategy : How might you get a handle on customer reaction to the strategy? What steps should you take before considering whether to roll out this strategy?
Names and numbers of london-based suppliers : Give the relational algebra expression for the following English queries. 1. Get the supplier# who supply all the blue parts
Create a digital marketing plan for an existent company : Students will create a digital marketing plan for either an existent company of their choice, or for a fictitious company. The focus of the report should be placed on a particular product or an event.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Illustrate how the asymptotic notation can be used to rank

To illustrate how the asymptotic notation can be used to rank the efficiency of algorithms, use the relations "C " and "=" to put the orders of the following functions into a sequence, where e is an arbitrary real constant, 0

  Sort the array and write out the sorted array

Consider a program that will read employee information into an array of objects, sort the array by employee identification number, write out the sorted array, and compute various statistics on the data, such as the average age of an employee.

  Entity types and relationships

Entity Types and Relationships

  Prompt the user for the number of sides

1.Prompt the user for the number of sides on the die.2."Roll" the die three times by generating a random number between 1 (inclusive) and the number of sides (inclusive).3.Keep track of the running sum of the rolls for the die and output the sum and ..

  Compare and contrast virtual teams and traditional teams

Compare and contrast virtual teams and traditional teams

  Web page makes effective and consistent use of headings

Use search engine to determine the example of Web page which makes effective and consistent use of headings to organize Web page content.

  Function of cryptographic hashing

Which of the following is NOT a function of cryptographic hashing:

  Explain the difference between form and report

Explain the difference between form and report

  What will be the values of h1 and h2

The ystem is using a 2x1 multiplexer (0.6ns delay) and k-bit tag comparator (k/10ns delay).Let H1 denotes hit latency for 2-way set associative cache and H2 denotes hit latency for direct mapped cache. What will be the values of H1 and H2.

  Thread problem

Implement what is kind of the inverse of our Producer - Consumer, where many Producers supply a limited capacity consumer.

  Describe the necessary hardware and software components

Your company wants to create an application that allows employees to dial in from a remote location and, using a single connection, access their voice mail, e-mail, and data files.

  Findthree definitions object-oriented programming andcompare

The machine language treats a message as bits while object-oriented programming language treats every message as an object

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