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]
2 years ago
11

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

Computers and Technology
1 answer:
defon2 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
Five Star Retro Video rents VHS tapes and DVDs to the same connoisseurs who like to buy LP record albums. The store rents new vi
umka2103 [35]

Answer:

The total cost is $13.0

Explanation:

Five Star Retro Video rents VHS tapes and DVDs to the same connoisseurs who like to buy LP record albums. The store rents new videos for $3.00 a night, and oldies for $2.00 a night.

Write a program that the clerks at Five Star Retro Video can use to calculate the total charge for a customer's video rentals.

The program should prompt the user for the number of each type of video and output the total cost.

8 0
2 years ago
After the data are appropriately processed, transformed, and stored, what is a good starting point for data mining?
Oksana_A [137]

Data visualization

Data visualization is a good starting point for data mining. There are several approaches to data mining that supports smart decisions. Data visualization places data in a visual context. It extracts the data in a clear and understandable way without any form of reading or writing. Results are displayed in the form of pie charts, graphs, and any other statistical representation. Such multidimensional views of data aid in developing a preliminary understanding of the trends that are hidden in the data set.

7 0
3 years ago
What command will unregister a component when run?
Advocard [28]
<span>Regsvr32.exe/u will unregister a component when run. Regsvr32.exe/u is a utility tool that is installed on Windows Xp or later versions of Windows. It has a 32-bit version and 64-bit version which can be found in the system root folder on a computer. It is capable of unregistering servers.</span>
7 0
3 years ago
Read 2 more answers
can I do all my work in a notebook with Penn foster or do I have to type all of the answers in that little box?
dusya [7]
Um whichever is better for you! ummm whats the point of this question?
5 0
3 years ago
Read 2 more answers
What kind of network connection do you think is used to connect most wireless video game controllers to consoles, and why would
Ostrovityanka [42]

Answer:

I would say Lan

Explanation:

5 0
3 years ago
Other questions:
  • _____ are the supertiny on-off switches in a chip that work collectively to calculate or store things in memory. Transistors Mul
    10·1 answer
  • When you first open office calc, the most recently saved spreadsheet opens up. A) true B) false
    14·1 answer
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    14·2 answers
  • After an informative session, you find yourself with several pages of notes. For maximum retention and understanding, you should
    6·1 answer
  • A disk takes 1 ms per track seek time, and the head is currently on track 70. Assume it takes 5 ms to service a request once the
    10·1 answer
  • Taking a group of recipes and identifying the similarities is an example of _____.
    13·1 answer
  • Answer to this problem
    11·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • what is the name of the fields in an x.509 digital certificate that are used when the parties negotiate a secure connection?
    11·1 answer
  • Question 5 of 10
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!