Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Assignment 5 Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, discussions, and assignments to date. Write a Java program as follows:...

1 answer below »
Assignment 5
Before attempting this project, be sure you have completed all of the reading assignments, non-
graded exercises, discussions, and assignments to date.
Write a Java program as follows:
(1) Prompt the user which action they want to take:
(a) Convert pounds into kilograms
(b) Convert height in inches to centimeters
(c) Calculate BMI display category
(d) Exit program
(2) Programs at minimum must have the following methods:
(a) Convert weight method gets pounds and returns kilograms
(b) Convert to height method that gets height in inches and returns meters
(c) Calculate BMI method that gets weight in kilograms and height in meters and returns
BMI value
(3) For each action the user should be prompted for co
esponding data and given the appropriate
output
(4) User should be able to select one action and then get prompted again for selection until they
select exit choice
Use the following for calculations
ï‚· To convert from pounds to kilograms use the formula: 1 pound = 0.45 kilograms
ï‚· To convert from height in inches to centimeters use the following formula: 1 inch = 2.54 cm
ï‚· To calculate BMI use the formula: weight-kg/height-cm/height-cm * 10,000
ï‚· For categories use:
o Underweight < 18.5
o Normal XXXXXXXXXX
o Overweight XXXXXXXXXX
o Obese >30.0
Test program:
A minimum of 4 test cases should be supplied in the form of table with columns indicating the
input values, expected output, actual output and if the test case passed or failed. This table should
contain 4 columns with appropriate labels and a row for each test case. An example template is
shown below. Note that the actual output should be the actual results you receive when running
your program and applying the input for the test record.
Make sure your Java program is using the recommended style such as:
ï‚· Javadoc comment up front with your name as author, date, and
ief purpose of the
program
ï‚· Comments for variables and blocks of code to describe major functionality
ï‚· Meaningful variable names and prompts
ï‚· Identifiers are written in upper CamelCase
ï‚· Class name starts with upper case letter and variables in lower case letter
ï‚· Constants are written in All Capitals
ï‚· Use proper spacing and empty lines to make code human readable

Capture execution:
You should capture and label screen captures associated with compiling your code, and running
each of your test cases.
Here is a sample run:
RUN:

MENU
1: Convert pounds into kilograms
2: Convert height in inches to centimeters
3: Calculate BMI using weight in kilograms and display category
9: Exit program

Enter your selection : 1

Enter weight in pounds : 150
XXXXXXXXXXlbs = 67.5 kg

MENU
1: Convert pounds into kilograms
2: Convert height in inches to centimeters
3: Calculate BMI using weight in kilograms and display category
9: Exit program

Enter your selection : 2

Enter height in inches : 58
XXXXXXXXXXinches = XXXXXXXXXXcm

MENU
1: Convert pounds into kilograms
2: Convert height in inches to centimeters
3: Calculate BMI using weight in kilograms and display category
9: Exit program

Enter your selection : 3

Enter weight in kg and height in centimeters separated by space : XXXXXXXXXX
BMI= XXXXXXXXXXCategory=Obese

MENU
1: Convert pounds into kilograms
2: Convert height in inches to centimeters
3: Calculate BMI using weight in kilograms and display category
9: Exit program

Enter your selection : 9

Thank you for using the program. Goodbye!

Example test cases:
Input Expected Output Actual Output Pass?
Selection=1 weight= XXXXXXXXXXlbs = 67.5 kg 150.0 lbs = 67.5 kg Yes
Test Case 2
Test Case 3
Test Case 4
Submission requirements
Deliverables include Java program (.java) and a single Word (or PDF) document. The Java and
Word/PDF files should be named appropriately for the assignment (as indicated in the
SubmissionRequirements document.
The word (or PDF) document should include screen captures showing the successful compiling
and running of each of the test cases. Each screen capture should be properly labeled clearly
indicated what the screen capture represents. The test cases table should be included in your
Word or PDF document and properly labeled as well.
Submit your files to Assignment 5 submission area no later than the due date listed in your
online classroom.
Grading Ru
ic:
The following grading ru
ic will be used to determine your grade:
Attribute Level
(15-20 points)
Level
(5-15 points)
Level 0
(0 - 5 points)
User input and loop Co
ect or
almost co
ect
prompts and
captured input
and loop code
Mistakes in
prompts and/or
capture of input
and/or loop
Missing or close to missing
user input and/or loop
Calculation and
output
Co
ect or
almost co
ect
calculation for
each selection
and output
Mistakes in
calculations
and/or output
Missing or significantly
inco
ect calculation and/or
output
Methods Code is co
ectly
implemented
using methods
Calculation code
is not all in
separate methods
Calculations are not
implemented as methods
Test Cases Co
ect or
almost co
ect
Mistakes or
incomplete test
Missing or significantly
inco
ect test cases
test cases and
test execution
cases and
execution
Program
documentation and
style
Co
ect or
almost co
ect
program
comments,
identifiers, and
screen captures
Mistakes or
incomplete
documentation
and/or style
Missing or significantly
inco
ect documentation and/or
style
Answered Same Day Feb 26, 2021

Solution

Neha answered on Feb 27 2021
153 Votes
76512 - calculator code/Main.java
76512 - calculator...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here