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 »
short java program



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 corresponding 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="" 18.5="" -="" 24.99="" o="" overweight="" 25.0="" -="" 29.99="" 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 brief 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 150.0 lbs = 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 58.0 inches = 147.32 cm 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 : 67.5 147.32 BMI=31.101429622597657 Category=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=150 150.0 lbs = 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 Rubric: The following grading rubric 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 Correct or almost correct 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 Correct or almost correct calculation for each selection and output Mistakes in calculations and/or output Missing or significantly incorrect calculation and/or output Methods Code is correctly implemented using methods Calculation code is not all in separate methods Calculations are not implemented as methods Test Cases Correct or almost correct Mistakes or incomplete test Missing or significantly incorrect test cases test cases and test execution cases and execution Program documentation and style Correct or almost correct program comments, identifiers, and screen captures Mistakes or incomplete documentation and/or style Missing or significantly incorrect documentation and/or style
Answered Same DayFeb 26, 2021

Answer To: Assignment 5 Before attempting this project, be sure you have completed all of the reading...

Neha answered on Feb 27 2021
152 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