Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Lab Report Assignment

OBJECTIVES

Create a class in java with appropriate methods.

Process user input with the class using the scanner for keyboard input and console output.

PROBLEM: Health Profile Console Program

GymsRUs has a need to provide fitness/health information to their clients, including BMI and maximum heart rate. Your task is to write a console program to do this.

Body mass index (BMI) is a measure of body fat based on a person's height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal.The formula to calculate BMI is

The following BMI categories are based on this calculation.

Category BMI RangeUnderweight less than 18.5Normal between 18.5 and 24.9Overweight between 25 and 29.9Obese 30 or more

Max heart rate is calculated as 200 minus a person's age.

FUNCTIONAL REQUIREMENTS

Design and code a class called HealthProfile to store information about clients and their fitness data. The attributes (name, age, weight, and height) are private instance variables. The class must include the following methods.

method descriptionsetName Receives a value to assign to private instance variablesetAge Receives a value to assign to private instance variablesetWeight Receives a value to assign to private instance variablesetHeight Receives TWO inputs (height in feet, inches). Converts and stores the total INCHES in private instance variablegetName Returns private instance variablegetAge Returns private instance variablegetWeight Returns private instance variablegetHeight Returns private instance variable (inches)getBMI Calculates and returns BMIgetCategory Returns category based on BMIgetMaxHR Calculates and returns maximum heart rate

Create a SEPARATE TEST CLASS, Lab1Main, to prompt for user input and display output using the HealthProfile class. Process multiple inputs using a loop.You can assume all user input is valid.

SAMPLE OUTPUT

Enter name or X to quit: John Smith
Your age: 35
Your weight: 200
Your height - feet: 6
Your height - inches: 0

Health Profile for John Smith
BMI: 27.1
BMI Category: overweight
Max heart rate: 185

Enter name or X to quit: Ann Jones
Your age: 50
Your weight: 120
Your height - feet: 5
Your height - inches: 2

Health Profile for Ann Jones
BMI: 21.9
BMI Category: normal
Max heart rate: 170

Enter name or X to quit: X

CODE STYLE REQUIREMENTS

Include meaningful comments throughout your code.
Use meaningful names for variables.
Code must be properly indented.
Include a comment header at beginning of each file, example below.

Lab report

Follow assignment specification regarding class/method names.

Objective/Purpose of the program

Briefly describe the program's requirements.

Analysis/Design

Describe the approach/structure of program.What classes/functions were used?

Testing/Results

Does your program satisfy all requirements of the lab?

If yes, how did you test it? Indicate test cases used, expected values, and show results with screen shots. For example:

Case

Description

Test Data

Expected Result

Actual Result

1

Describe what you are testing

Specify the test data

What is expected

Actual results- reference an image that you include below. 

If any requirements are NOT met, document the known issues. What did you do to try to solve them?

Make sure you demonstrate in your testing the parts that are working correctly.

Conclusions / Lessons Learned

What difficult problems did you encounter, and how did you handle them?

What new concepts did you learn/reinforce with this lab?

Is there anything you would have done differently?

Java, Programming

  • Category:- Java
  • Reference No.:- M92715830
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Java

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As