1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tpy6a [65]
3 years ago
11

How to do pseudocode and flowchart in BMI ( computer programming ​

Computers and Technology
1 answer:
defon3 years ago
5 0

Answer:

You need to find out what is the units of measurement of the height and weight. You also need to find that the weight is in Kilogram or pounds, and whether the height is in feet and inches, or inches, or meters and centimeters.

Part1: You need to read the values of the weight and height, and validate it as required.

Part2: Now you need to convert those findings into English measures or metrics for computation.

Part3: Output: You need to display as well as echo the input as well as the BMI; and you need to mention the supplementary message which is based on the BMI findings related to Obesity, borderline overweight, normal and overweight, etc.

The program is as below:

import java.io. *;

class Main

{

// weight in pounds and heights are in inches

private double your_wght;

private double your_hght;

Main ( double ht, double wt)

{

your_wght = wt; your_hght = ht;

}

public double GetHght() { return(your_hght); }

public double GetWght() { return(your_wght); }

public double CalculBMI() { return(your_wght*703/(your_hght*your_hght)); }

public double PrintDouble( String promptMessage) throws IOException

{

double Num=0;

String x=null;

Console console = System.console();

System.out.print(promptMessage);  

x = console.readLine();  

Num = Double.parseDouble(x);

return(Num);  

}  

public static void main( String args[])

{

double heightinFeet=0,heightinInch=0,w=0;

Main Input = new Main(0,0);

try

{

System.out.println(" Please input the height(feet/inches) \n");

heightinFeet = Input.PrintDouble(" In feet :> ");

heightinInch = Input.PrintDouble(" In inches :> ");

w = Input.PrintDouble(" Please enter the weight(pounds) :>");

}

catch (IOException ex) { System.out.println("occurred Input Exception"); }  

Main BMI_value = new Main(heightinFeet*12+heightinInch,w);  

System.out.println(" Weight = " + BMI_value.GetWght() );  

System.out.println(" Height(inches) " + BMI_value.GetHght() );

System.out.println(" BMI is " + BMI_value.CalculBMI() );  

}

}

Explanation:

Rest of the fields and properties are self understood, however, PrintMessage needs explanation. It takes a string as input, which calls for entering some double value like in feet, and in inches, and returns that value, which is assigned to relevant double variable. And Main is the class with Main constructor, which is a parameterized constructor, and takes height and weight as input.

You might be interested in
The function of while loop is
Alona [7]

Answer:

B repeat a chunk of code until the condition is true im 88% sure

4 0
2 years ago
A ___________ is the smallest unit in a written language.
Delvig [45]
A. string? maybee its a string of units


8 0
3 years ago
Read 2 more answers
DIRECTIONS: Organize your desktop. Name the 5 folders based on the files given below. Organize your own desktop by sorting the g
dem82 [27]

Answer: Music, Documents, PowerPoints, Pictures/Videos, Audios

6 0
3 years ago
Write steps: To open an old documents​
myrzilka [38]

Answer:

1.Click.

2.Choose “All Programs”

3.Then select, the “Microsoft Office” folder.

4.Now, open your desired Office application. 5.for e.g Microsoft Word 2010.

6.Once the application opens, select.

Click.

7.Now, select the document you wish to open in Office 2010 and click.

3 0
2 years ago
_ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
Jet001 [13]

Answer:

Cloud computing is the correct answer of this question.

Explanation:

Cloud computing presents a easy way of consuming databases, servers, repositories and a vast variety of web technology infrastructure.Cloud computing allows that can save considerable construction costs without relying on internal server resources and device requirements.Cloud computing is the provision of various resources over the Web.

8 0
3 years ago
Other questions:
  • The following declaration appears in a program: short totalPay, basePay = 500, bonus = 1000; The following statement appears in
    9·1 answer
  • Walking paths across the part is represented by the equation why equals -4x - 6​
    9·1 answer
  • In each iteration, selection sort (small) places which element in the correct location?
    9·1 answer
  • An expression involving byte, int, and literal numbers is promoted to which of these?
    12·1 answer
  • You can change the transparency of a picture used as a slide’s background with the ____.
    10·1 answer
  • All of the following are aspects of the search process except?
    6·2 answers
  • Assume that ip has been declared to be a pointer to int and that result has been declared to be an array of 100 elements . Assum
    9·1 answer
  • The I/O modules take care of data movement between main memory and a particular device interface.A. TrueB. False
    9·1 answer
  • Find the unknown quantities
    12·1 answer
  • Which statement correctly describes the difference between an IP address and a MAC address for a
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!