Question
ANDROID STUDIO JAVA SCRIPTED Create an Android mobile app that can help the user calculate the standard weight. By entering the gender and height, the
ANDROID STUDIO
JAVA SCRIPTED
Create an Android mobile app that can help the user calculate the standard weight. By entering the gender and height, the app can tell you what is the standard weight.
Step 1: Create an empty Android project, named MyCalculator
Step 2: Create two layout files (.xml). One layout file is used to enter gender and height information and another layout file is used to present the standard weight, which is calculated by using Step 4 formula. (Figure 1 and 2)
Step 3: Create two activities, named Calculator.java and Result.java, and link each of them to a layout file respectively. When clicking on the Calculate button in Calculator activity, the application will show results in Result activity.
Step 4: Please use following formula to calculate standard weight for male and female respectively.1 Males Ideal Body Weight = 50 kg + 2.3 kg * (Height(inches) - 60) Females Ideal Body Weight = 45.5 kg + 2.3 kg * (Height(inches) - 60)
Lab_MyCalculator Result You are Male Your height is 56 The standard weight is 63.80 kg Calculate Standard Weight Gender: Male Female Height: 5 feet 6 inches CALCULATE Lab_MyCalculator Result You are Male Your height is 56 The standard weight is 63.80 kg Calculate Standard Weight Gender: Male Female Height: 5 feet 6 inches CALCULATEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started