Professional Documents
Culture Documents
MAD Report
MAD Report
BMI Calculator
in
Submitted by
Vinayak S Desai
2GI19CS180
GUIDE
CERTIFICATE
This is to certify that the students Vinayak S Desai of 7th semester bearing USN’s
2GI19CS180 have satisfactorily completed the course activity (Project) in Mobile
Application Development course (Course code: 18CSL78). It can be considered as a
bonafide work carried out in partial fulfillment for the academic requirement of 7th Semester
B.E prescribed by KLS Gogte Institute of Technology, Belagavi during the academic year
2022- 2023.
The report has been approved as it satisfies the academic requirements in respect of
Assignment (Course project) prescribed for the said Degree.
Date:
1|Page
Marks allocation
Batch No.:
Total 20
2|Page
independent and lifelong learning in the broadest context of technological channel.
PROBLEM STATEMENT
According to the World Health Organization Body Mass Index (BMI) is a measure for
indicating nutritional status in adults. It is defined as a person’s weight in kilograms
divided by the square of the person’s height in meters (kg/m2). BMI are usually used
to have an idea of the health status of an individual. Table 1. Nutritional status BMI
Nutritional status Below 18.5 Underweight 18.5–24.9 Normal weight 25.0–29.9
Overweight Above 30.0 Obesity .Thus, develop an app to calculate BMI value.
INTRODUCTION
Mobile phones have become a major part of our daily lives. The importance of them is since
they are an easy way of communication, Internet access and social media. They also save
money, ensure safety, help in business and many more.
Mobile phones can support a wide range of applications, giving them many of the same
functions available on a laptop but without the extra bulk.
Anyone who has a smart phone or another mobile device probably uses apps to play games,
get directions, access news, books, weather, and so on. Mobile apps are easy to download, are
often free and are convenient such that sometimes users might download them without
thinking about some key considerations: how they are paid for, what information they may
gather from the device, or who gets that information.
There is a need to continue to develop new apps that serve the growing demands of mobile
users. The market of mobile apps makes use of new mobile and hardware technologies, and
therefor expands with the expansion of these technologies.
During the past few decades, advancements in technology have been exceptionally fast,
especially in computer and mobile technologies. This fast improvement resulted in a need to
develop applications and services that enhance human lives.
Body Mass Index (BMI) is the technique that is used to determine the health status of an
individual. This technique has become widely used in many desktop and mobile applications.
In this project, we developed BMI Calculator, which is a mobile application that calculates
BMI value with input of height and weight in cm’s and kg’s respectively and then based on
result can work on diet.
3|Page
FUNCTIONAL BLOCK DIAGRAM
4|Page
WORKING MODEL
5|Page
6|Page
WORKING CODE
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BMI Calculator"
android:textAllCaps="true"
android:textSize="26sp"
android:layout_marginVertical="25dp"
android:textColor="#212121"
/>
<TextView
android:layout_width="match_parent"
android:layout_marginHorizontal="50dp"
android:layout_height="wrap_content"
android:text="Your Height in Cm"
android:textColor="#000"
/>
<EditText
android:id="@+id/height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="50dp"
android:layout_marginVertical="10dp"
android:paddingHorizontal="15dp"
android:paddingVertical="12dp"
android:inputType="numberDecimal"
/>
<TextView
android:layout_width="match_parent"
android:layout_marginHorizontal="50dp"
android:layout_height="wrap_content"
android:text="Your Weight in kg "
android:textColor="#000"
/>
<EditText
android:id="@+id/weight"
android:layout_width="match_parent"
7|Page
android:layout_height="wrap_content"
android:layout_marginHorizontal="50dp"
android:layout_marginVertical="10dp"
android:paddingHorizontal="15dp"
android:paddingVertical="12dp"
android:inputType="numberDecimal"
/>
<Button
android:id="@+id/btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="50dp"
android:text="Calculate"
android:textColor="#fafafa"
android:textSize="28sp"
android:background="#0984e3"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_marginHorizontal="50dp"
android:text="Your Result"
android:textAllCaps="true"
android:textSize="26sp"
android:layout_marginVertical="15dp"
/>
<TextView
android:id="@+id/result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:text=""
/>
<TextView
android:id="@+id/bmiCat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:text=""
/>
</LinearLayout>
8|Page
MainActivity.java
package com.easeprogramming.bmicalculator;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
9|Page
import android.widget.TextView;
import java.text.DecimalFormat;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myButtonListenerMethod();
button.setOnClickListener(new View.OnClickListener() {
@Override
10 | P a g e
double BMI = (weight) / (heightM * heightM);
BMIResult.setText(Double.toString(BMI_trimmed));
String BMI_Cat;
BMI_Cat = "Underweight";
BMI_Cat = "Normal";
BMI_Cat = "Overweight";
11 | P a g e
else if (BMI>=30 && BMI < 35 ){
else {
BMICategory.setText(BMI_Cat);
});
12 | P a g e
CONCLUSION
In this project, a mobile application has been developed, BMI Calculator, which:
REFERENCES
https://www.nhlbi.nih.gov/health/educational/lose_wt/BMI/bmicalc.htm
https://www.google.com/search?
q=functional+block+diagram+for+bmi+calculator&rlz=1C1CHBF_enIN889IN889&o
q=functional+block+diagram+for+BMI&aqs=chrome.1.69i57j33i160.12841j0j7&sou
rceid=chrome&ie=UTF-8#imgrc=JcCz22852HcgVM
https://www.researchgate.net/publication/
330779530_Design_And_Development_Of_A_Mobile-
Based_Intelligent_System_For_Weight_Management
13 | P a g e