Question: Please read all the question carefully and also include // (comments) when you write the code and please make sure you follow the instructions. Thak
Please read all the question carefully and also include // (comments) when you write the code and please make sure you follow the instructions. Thak you
Objective
To build a complete working Java program that offer practice with basic Java graphical user interface components and the interaction of a GUI with an object of a class.
Overview & Instruction
| Write a Java program that will calculate a variety of health-related values based on user input via a graphical user interface. Create (or enhance the previously-used) a HealthLog class. This Java class will store basic parameters based on the calories burned for working out. Design the class to store basic information about a person as well as to calculate various health parameters:
Your class should include a method for basic error checking. Build this method to return true of all information "set" into the object is value and false otherwise. Include "common sense" tests for all member variables of the class (for both upper and lower bounds). Any additional flexibility in error checking is optional. Calculations required for this solution are defined below:
| ||||||||||||||||||||||||||
Your solution should include two files: one containing the HealthLog class including the data and method definitions and a second file to contain the "driver" application. Your driver application should include a basic graphical user interface with text fields (including appropriate labels), a text area, and a button. You are free to read ahead to include other interface components such as checkboxes or drop-down lists if you wish.
When the user clicks the button
All of the information is collected from the input text fields
The data are then set into the HealthLog object
The input is validated by a message passed to object to determine if all values are in range.
The various calculations methods are invoked and the results are retrieved from the object.
A summary health report is formatted as a String object and set into the text area including:
Calories burned during workout
Maximum and minimum target heart rate range
Body mass index and classification
Minimum daily energy requirements (assuming no activity)
Be very careful of the units of measure for the various calculations. You will also need to research some basic unit conversions to accomplish this solution.
Show transcribed image text
BMI = 703w 3Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
