Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 licence

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions