You are on page 1of 10

1

FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT


UNIVERSITI TUN HUSSEIN ONN MALAYSIA

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. Madya Dr. 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. 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. In our study, a system has been developed to calculate a person's BMI. In this study, we
have developed the system using the java concept in the phase of Graphical user interface programming
(GUI). The aims for this study are to learn and understand programming with Graphical User Interface
(GUI). From this study, the outcomes from this learn more about how to construct object-oriented program
using (GUI). The conclusion, system equipment need out achieve the objective the system development
using Graphical user interface (GUI).

problems. Overweight and obesity cluster with


I. INTRODUCTION1
other risk factors for cardiovascular disease
Obesity is a significant public health issue
(CVD). The association of increasing weight with
that affects health status and health outcomes.
increased morbidity and mortality from CVD in
Overweight and obesity are associated with
individuals is well documented. In addition,
marked decreases in life expectancy and an
overweight and obesity are associated with
increased risk of morbidity and mortality from
reductions in health-related quality of Life. The
chronic conditions including Type 2 diabetes,
body mass index (BMI) or Quetelet index is a
respiratory disease (including asthma and
value derived from the mass (weight) and height
obstructive sleep apnoea), osteoarthritis, breast
of an individual. The BMI is defined as the body
cancer, gall bladder disease, and reproductive
mass divided by the square of the body height,
and is universally expressed in units of kg/m2, computer system's GUI and a car's steering wheel.
resulting from mass in kilograms and height in The wheel directly binds the driver to the
metre. operation and functionality of the vehicle. When
The BMI is an attempt to quantify the driving, a driver should not have to concentrate
amount of tissue mass (muscle, fat, and bone) in on the steering wheel. In the same way, the GUI
an individual, and then categorize that person as binds the user of the computer system to the
underweight, normal weight, overweight, or obese operation and potential of the computer system. A
based on that value. However, there is some good GUI design removes the impediment of
debate about where on the BMI scale the dividing communication with the computer system and
lines between categories should be placed. allows the user to work directly on the problem at
Commonly accepted BMI ranges are hand.
underweight: under 18.5 kg/m2, normal weight: In computer science terms, the GUI is a
18.5 to 25, overweight: 25 to 30, obese: over 30. visual operating display that the monitor presents
People of Asian descent have different on the monitor to the computer operator. More
associations between BMI, percentage of body specifically, a GUI is a specification for the look
fat, and health risks than those of European and feel of the computer system. GUI usually
descent, with a higher risk of type 2 diabetes and have common characteristic such as windows,
cardiovascular disease at BMIs lower than the icons, menus, and push-buttons (WIMP). The
WHO cut-off point for overweight, 25 kg/m2, user issues commands via the GUI to computer
although the cut off for observed risk varies applications. GUI usually has three major
among different Asian populations. components. These three components are: a
A GUI is a type of computer human windowing system, an imaging model, and an
interface on a computer. It solves the blank screen application program interface (API). The
problem that confronted early computer users. windowing system builds the windows, menus,
These early users sat down in front of a computer and dialog boxes that appear on the screen. The
and faced a blank screen, with only a prompt. The imaging model defines the fonts and graphics that
computer gave the user no indication what the appear on the screen. WIMP is products of both
user was to do next. GUI is an attempt to solve the windowing system and imaging model.
this blank screen problem. At a conceptual level, Finally, the API is the means in which the user
a computer human interface is a "means by which specifies how and what windows and graphics
people and computers communicate with each appear on the screen.
other". One can make an analogy between a
3
FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT
UNIVERSITI TUN HUSSEIN ONN MALAYSIA

II. BACKGROUND III. HARDWARE AND SOFTWARE DESCRIPTION


This study is about the calculation process
For our project BMI Calculator using Graphical
of the standard BMI of existing methods. Body
User Interface (GUI) Platform, we use laptop
weight is a major influence on health throughout
device for the implement the system meanwhile
life. Obese people are generally less healthy and
Netbeans for the software we use in our project.
are more prone to illnesses such as diabetes,
In software Netbeans, is a site building and
hypertension, heart diseases, gall bladder diseases
publishing tool appropriate for intermediate to
and arthritis. Weigh yourself regularly and know
advanced users that allows you to create and edit
your desirable body weight. Weigh yourself at
web pages and applications using a graphical
least twice a month at the same time of the day
interface and built-in advanced design and coding
wearing light clothing. You can calculate your
features. NetBeans is also referred to as a
Body Mass Index (BMI) by using the following
platform of modular components used for
formula:
developing Java desktop applications.

BMI = Weight (kg) / [Height (m) x Height (m)]


IV. EMBEDDED SYSTEM
If Your BMI is less than 18.5, you are underweight
If Your BMI is 18.5 to less than 25, your weight is This phase show the coding of the system to
normal
design the interface.
If Your BMI is 25 to less than 30, you are overweight
If Your BMI is 30 or more, you are obese Login Form

Figure: Formula to calculate the BMI

However, the above value is not true


because of the calculation result follow user
condition. In addition to BMI computation, this
system is also developed with the Login function
to achieve entry into this system, besides the
registration method for calling on the Login
module. In this system, reset button testing is also
built for the user to clean the information entered
and enter new information by the user.
Register Form
5
FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT
UNIVERSITI TUN HUSSEIN ONN MALAYSIA
BMI Form
7
FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT
UNIVERSITI TUN HUSSEIN ONN MALAYSIA

and button “Main Menu” to directly go to the

V. INPUT OUTPUT Login Page.

Generated Input

This Input are for regular user

Step 1: Input Username and Password

This Input for first time user where they need to


register the system and log into the system.

Step 2: By click “Login”, the system will directly Step 1: First time user need to register account

go to the Register Form. first. Click “Create here to a new account”. This
will link user to “Register” page.

Step 3: In register Form, fill in all information


and use button “CALCULATE” to calculate your
Step 2: Register Page will require user to fill all
BMI and the output will accordingly produced.
the information. Click ”Login” will bring user to
Use button “RESET” to re-input the information
Login Page and the process are repeated
according by the usage of each button linked.
A. BMI code
BMI code are used for user to calculate
their BMI in order to know either they are
overweight or underweight.

public class BmiForm extends


javax.swing.JFrame {
public BmiForm() {
initComponents();
}

B. Login code
Login code are used for user to login their
Production of Output
account in order to calculate their BMI.
The output will produce as follows. public class LoginForm extends
javax.swing.JFrame {
public LoginForm() {
initComponents();
this.setLocationRelativeTo(null);
}

C. Register code
Register code is used to make a user to
create
VI. PROJECT IMPLEMENTATION

This part show programmed code segment that animport javax.swing.JFrame;


account.
public class RegisterForm extends
been used in this system for BMI Form, Login javax.swing.JFrame {
public RegisterForm() {
Form and Register Form. initComponents();
this.setLocationRelativeTo(null);
}
9
FAKULTI SAINS KOMPUTER DAN TEKNOLOGI MAKLUMAT
UNIVERSITI TUN HUSSEIN ONN MALAYSIA

VII. EXPERIMENTAL RESULTS & DISCUSSIONS


Calculation is made using readings base on the
height and weight that the user input in the BMI
Calculator. This calculator helps the user to
identify their BMI through the BMI calculation.
The BMI calculator is very helpful to the user to
identify either they are normal, overweight or
underweight. If users get a high BMI, the user can
have health problem that related to a greater risk
of developing serious health condition, such as
Figure 2 shows that user can enter their weight
heart disease, high blood pressure, lover disease and height in order to calculate their BMI.
and etc. For very low BMI also can cause health
problem too that may lead to bone loss, decreased
immune function, heart problem and iron
deficiency. The user needs to meet doctor if the
weight keeps being very low. The BMI calculator
is pretty convenient to use to calculate our body
fatness. BMI will help us to track our weight
whether our weight is normal or not.

Figure 3 shows the result of the BMI.

ACKNOWLEDGMENT
I would like to express my deepest appreciation to
all those who provided us the possibility to
complete this report. A special gratitude I give to
our java final project lecturer, Prof Madya Dr
Aida Binti Mustapha, whose contribution in

Figure 1 shows that user needs to enter their stimulating suggestions and
Username and Password.
encouragement, helped us to coordinate this
project especially in writing this report.
Furthermore, A special thanks goes to all team
mate, help me to assemble the parts and gave
suggestion about the task “BMI calculator by
using GUI”. Last but not least, many thanks go to
the classmate, class representative for being the
most sporting classmate and helpful in a way of
conducting the class of JAVA programming.

CONCLUSION
In conclusion, this BMI calculator will give a lot
of benefits which consists quick relation between
weight and height for students in UTHM. This
system is simple and it would make their works to
become easier. The system also saves cost and
time. The purpose of it to make sure that the
student can maintain their health and live in
healthy life. Other than that, Basal Metabolic Rate
(BMR) alert student to take care a good health
and always practicing healthy lifestyle. By
knowing the BMI, student will be able to know
real condition of their body where somehow who
look fat in real but have the normal BMI and vice
versa. During student’s leisure time, it is
important for student to calculate their BMI so
that they know how condition that theirs body are
in. Definitely, students do not have much time to
do some exercise. Thus, with BMI calculator, it is
easier for students to plan their activities to
prevent from obesity and overweight. We really
hope that this BMI have been created will bring
great success to group and useful.