Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Assessment Task

You are to write a Java console application that calculates and classifies BMI (Body Mass Index) for individuals. The number of individuals (N) is fixed at 10, so it should be declared as final int N = 10 in your program.

BMI is calculated using the following equation: BMI = weight / (height*height) where weight is in kilograms and height is in metres.

defines the following 8 categories for BMI:

Category

BMI (kg/m2)

 

from

to

Very severely underweight

 

15

Severely underweight

15

16

Underweight

16

18.5

Normal (healthy weight)

18.5

25

Overweight

25

30

Obese Class I (Moderately obese)

30

35

Obese Class II (Severely obese)

35

40

Obese Class III (Very severely obese)

40

 

For each person, you are to enter their weight (in kilograms) and height (in metres).The application is to then calculate and display the BMI, together with the corresponding 8 level category. When all data has been entered, a summary report consisting of
1. The lowest BMI
2. The highest BMI
3. The average BMI
4. The number of individuals with normal BMI
5. The number of individuals with higher than normal BMI
6. The number of individuals with lower than normal BMI is displayed.

Normal, low and high BMI values are defined according to the table below:

Category

BMI (kg/m2)

 

from

to

Low

 

18.5

Normal (healthy weight)

18.5

25

High

25

 

Below is example output for N = 3
Your welcome message goes here ...

Height for person 1 (m): 1.82
Weight for person 1 (kgs): 80
BMI for person 1: 24.2 which is normal (healthy weight) Height for person 2 (m): 1.82
Weight for person 2 (kgs): 100
BMI for person 2: 30.2 which is moderately obese Height for person 3 (m): 1.82
Weight for person 3 (kgs): 60
BMI for person 3: 18.1 which is underweight

Summary
*******
Lowest BMI : 18.1 Highest BMI : 30.2 Average BMI : 24.2 Number with low BMI: 1
Number with normal BMI: 1 Number with high BMI: 1

Your exit message goes here ...

Your application is to follow the same format for input and output as in the example above, but with customised welcome and exit messages.
The application is to use the following classes and methods: public class BMICalculator {
public BMICalculator() {
// no code required
}

public double value( double weight, double height ) {
// return BMI;
}

public String classification8( double bmi ) {
// return the 8 category (Wikipedia) classification for this BMI
}

public String classification3( double bmi ) {
// return the 3 category (high, normal, low) classification for this BMI
}
}

public class Assignment1 {

// no attributes required

public static void main(String[] args) {
// local variable declarations go here
// display welcome message
// loop to input an individual's height and weight and calculate and display BMI, calculate summary values
// generate and display summary
// display exit message
}
}

Submission

You are to submit a zipped folder containing

The two .java files that comprise your application. Alternatively, if you have used NetBeans, this can be replaced with a zipped project folder. Details of how to do this are available in the NetBeans FAQ on the unit website.

Report.docx. This file contains a test report that includes student name, student ID number, unit name, unit code, a test plan and test results. The test plan is to contain a list of the input values that you have used to test the program, the expected output values and the actual output values generated by your program. The test results are screenshots to show that that the program generates the actual outputs shown in the test plan.

Note that because BMI is calculated as a floating point value, we can't (in general) test it for equality. What this means in terms of your test plan is that you do not need to test the category end points - all you need to do is to generate one set of inputs (and the corresponding output) per category. In generating these inputs, you may find a BMI calculator useful. Note that markers will use their own test data when testing your assignment.

Java, Programming

  • Category:- Java
  • Reference No.:- M92786486
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

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 ...

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 ...

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 ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

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 ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

  • 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