Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using JAVA language You will use statements from the BMI and UserDetails classes to write methods for this task. Your task should ask the end
using JAVA language
You will use statements from the BMI and UserDetails classes to write methods for this task. Your task should ask the end user for the following particulars Firstname, Surname, Age, Height and Weight. You are to assume that if the end user is 21 years and above, they hold a driving licence. Write methods to work out the end user's BMI and advise them of their health status using the rules established in the previous exercise. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program to allow the user to enter their weight in pounds and height in inches. Note that if one pound is 0.4535 kilograms and one inch is 0.0254 meters, display the BMI for the user. Add additional lines of code to display a message to say "you are over-weight" if the BMI exceeds 25 or display a message to say "you are under-weight" if the BMI is 20 or less otherwise, display a message to say "you are fine" Write methods to work out the user's username by taking the first 2 letters of their firstname and first 2 letters of their surname. The username should be in uppercase The final output should display fullname using title case, username, age, BMI, Health status and state if the user holds a driving licenceStep 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