Write java code for a bmi class with a default constructor

Assignment Help Computer Engineering
Reference no: EM131985129

Problem

A local health club wants to computerize the Body Mass Index (BMI) calculation for its members.

The BMI calculator uses height and weight to calculate the BMI. The BMI formula is:

Write java code for a BMI Class with both a default & non-default constructor, standard accessors, mutators (with valid argument checking), a method to return the BMI value, and a toString() method. The toString() method should also return the Weight Status from the below table.

BMI Weight Status Categories
BMI Weight Status
Below 18.5 Underweight
18.5 -24.9 Normal
25 - 29.9 Overweight
30 & Above Obese

Here is a sample code segment you might use to test your BMI class.
BMI data1 = new BMI();
BMI data2 = new BMI(250, 60);
data1.setHeight(76);
double value=data2.getBMI();
System.out.println(data1);
System.out.println(data2);

Reference no: EM131985129

Questions Cloud

What is the flow process in the customer every hour : What is the flow process in the customer every hour? Assuming unlimited demand, what is the new flow rate if the center adds the server to bottleneck resource?
Review the financial performance of skinner industries : Skinner Industries from Conway, North Carolina has found an exclusive market in supplementary equipment to support the ever increasing motor sports market.
Write a program that reads a list of concepts from text file : Write a program that reads a list of concepts/strings from the LIST.txt text file (one concept per line), stores them into an array of strings and then prints.
What is the degree of combined leverage : If you combine Sinclair's capital structure with Boswell's operating plan, what is the degree of combined leverage?
Write java code for a bmi class with a default constructor : Write java code for a BMI Class with both a default & non-default constructor, standard accessors, mutators (with valid argument checking), a method to return.
What is the size of the payments that must be deposited : What is the size of the payments that must be deposited at the beginning of each 6-month period in an account that pays 9.6%, compounded semiannually.
The present value of the expected future returns : Since shareholder wealth is the present value of the expected future returns to the owners of the business.
Tools of communication in organisation : Project - TOOLS OF COMMUNICATION IN ORGANISATION - coherent concepts relating to the topic with appropriate in-text citations of the sources
Will eric receive a refund or owe additional tax : Based on his withholding, will Eric receive a refund or owe additional tax? What is the amount?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Express developments in emerging technologies

Are you a optimistic or apprehensive about developments in emerging technologies that simulate human experience? Give examples of a business situation that would benefit from each of the following.

  How will the procedures for making changes to user accounts

How will the procedures for making changes to the user accounts, such as password changes, be different for remote users?

  Estimate the computation time for the program

Estimate the computation time for the program in the above problem assuming the following time characteristics.

  Prove that edit distance on text strings defines a metric

Prove that edit distance on text strings defines a metric. Establish convincing upper and lower bounds on this expected distance for partial credit.

  1read the lecture notes and select one 1 instance in the

1.read the lecture notes and select one 1 instance in the history of hci that you view as a key development that have

  How would you recommend that PKI be implemented

Your company is considering incorporating PKI. How would you recommend that PKI be implemented to support these two application areas?

  Provide a java class named "input"

Provide a Java class named "Input" containing the method "readInt" (prototype given below) that displays the prompt string, reads an integer, and tests either it is between the supplied minimum and maximum. If not, it prints an error message and r..

  How might the file be compromised in the given case

UNIX treats file directories in the same fashion as files; that is, both are defined by the same type of data structure, called an inode.

  Create flowcharts that describe the step in training process

Create two flowcharts that describe the steps in the training process. The first flowchart should describe the step-by-step process that users with basic skill.

  How does one choose the best bit rate for a sound clip

How does one choose the best bit rate for a sound clip? What are the two categories of Flash components? Which event model does Flash use?

  Multicast routing paradigm

The data-driven multicast routing paradigm works best on the local networks which have low delay and excess capacity, however the demand driven paradigm works best in the wide are environment which has limited capacity and higher delay.

  Design program using switch statements in visual basic

design program using switch statements in Visual Basic.

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