INTRODUCTION1 Obesity is a significant public health issue that affects health status and health outcomes. The conclusion, system equipment need out achieve the objective the system development using Graphical user interface (GUI). From this study, the outcomes from this learn more about how to construct object-oriented program using (GUI). The aims for this study are to learn and understand programming with Graphical User Interface (GUI). In this study, we have developed the system using the java concept in the phase of Graphical user interface programming (GUI). In our study, a system has been developed to calculate a person's BMI. The issue of body weight as a risk factor for chronic diseases such as diabetes, heart disease, stroke and cancer has increased dramatically over the last decade in Malaysia. Aida binti Mustapha Abstract -Overweight and obesity are significant public health issues in developed and developing countries, not only for adults but also increasingly for children. JAVA PROGRAMMING: BMI CALCULATOR USING GRAPHICAL USER INTERFACE (GUI) PLATFORM Nurul Atieqah binti Ibrahim, Nurul Syifa’ binti Mohd Noor, Noor Fatihah binti Razali, Nursyahirah binti Mohamad Saity Prof. If (b = 18.5 & b 25 & b 30 & b 35 & b Īfter this step, you can access the BMI calculator module from the HTML file.FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT UNIVERSITI TUN HUSSEIN ONN MALAYSIA Var b = w/(h*h) // According to the formulaĭocument.getElementById("ans").value = String(b.toPrecision(3)) +" kg/m^2" // writing to the output Var h = parseFloat(document.getElementById("height").value)/100 // Convert height to meters ![]() Var w = parseFloat(document.getElementById("weight").value) // To get weight from the input with id as weight We can classify the BMI into the following categories: Now we need to write a function named bmi to calculate the BMI of the user from the entered values. The interface looks like the below image: The function “document.write” is used to write to the HTML document in which the file “bmi.js” is included. Then write the following code to create an input interface for the user.Create a javascript file by the name of “bmi.js”.Now we should collect mass and height-related information as follows: So, our main goal is to collect information from the height, weight information from the user, and calculate body mass index by the following formula: How to make a BMI calculator using JavaScriptįirstly, what is the body mass index (BMI)?īody mass index ( BMI) is defined as the body mass divided by the square of the body height and is expressed in units of kg/m 2, resulting from mass in kilograms and height in meters. I am using Visual Studio Code for editing, you can use any editor you are comfortable with. The readers are suggested to use an editor while writing the code. ![]() Although a basic understanding of HTML and DOM ( Document Object Model ) will give you an edge. There are no specific pre-requisites for this tutorial. This tutorial will not only enhance your knowledge about BMI calculation but also provide a basic understanding of JavaScript. This module can be included in any of the HTML files with a single line of code. ![]() Hello! In this tutorial, we will be building a body mass index (BMI) calculator in JavaScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |