Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CPS180/ Murtny Part B: Test Scores and Grade [10 pointa Programming Assignment 4 (15+10-25 points) Problem Statement Review Problem 4 in Programming Challenges at th

image text in transcribed

CPS180/ Murtny Part B: Test Scores and Grade [10 pointa Programming Assignment 4 (15+10-25 points) Problem Statement Review Problem 4 in Programming Challenges at th end of Chapter 3 (page 181) Assigned: Tuesday, Week #7 Due: Thursday, Week #8 Purpose To experience usage of decision structures. and formatting using printf when displaying double-type values in the output. Additional requirement: obtain student's name (full name, with last name, followed by a comma, and first name) Display full name in the output as shown below ht prejest Part A: Computation of Body Mass Index and interpretation of the result [15 points)] Ask the student's name and save it. Obtain three test scores that may contain decimal fractions (not whole numbers). Read input from console keyboard input using Scanner class. Calculate the grade using nested if-else if statements presented in Chapter 3. Declare a double variable (to be named as average) and save average of three scores. Declare two character variables: grade (for storing the letter grade), and initial for storing the first character of the last name of the student (e.g. name.charAt0)). Produce the output as follows Problem Statement Review Problem 3 in Programming Challenges at the end of Chapter 3 (page 181) Ask the person's name and save it in a String variable. Then ask that person for weight in pounds, and height in inches and save them in appropriately mamed variables (with proper type, hint: in this case both are double as they can receive inputs that contain fractions also, not necessarily whole numbers). Sample output (Line numbers are shown for guidance - need not appear in output) Welcome to ers>'s Grade Reporting Service Line 1 Line2: surnan Calculate BMI and display its value and diagnosis as shown below: Line6 Line 7: Line 8: Line 9 Line 10: Line 11 Linel2 Line 13: Line 14: Hello Soloaw.Your records are stored under file:n Your test score information is Score 1 Score 2 Score 3- Average = Your Grade= blank line given below: Cuse 48.2 f format field for data> Cuse 68.2 f format field for data> cuse 63.2 fformat field for data> Cuse 963.2 f format field for data> Sample output (Line numbers are shown for guidance-need not appear in guuitput) Welcome to gour 's Clinic Line 1 Line2: Line4 Line5 Line6: Line 7 Line 8: Line 9 Line 10 Hello eperaan'same Your height in inchea.xxxxxx qse %8.4 f format field for dat.> Your weight in pounds: 88&XXKK qse68.4 f format field for data> Your BMI is calculated a3 Our Diagnosis For your height and weight, BM is k you for using our service! Come back agai!! ose 168.4 f format field for data> What to submit Test the program with different values of inputs that produces all different diagnosis outputs for all cases. Submit Prog4Ijava and Output41 docz-Copy and paste output onto toa word document for several runs as described abore What to Submit: the source code you developed for PA4a (wih jaaon Blackboard Submit PA4a output. doex which should contain ouput for 4 different opes of inputs, showing optimal, ove eight and undens Submit Prog4b java and Output4b docs-Copy and paste output onto to a word document for several runs as described abore. usual or i r choic CPS180/ Murtny Part B: Test Scores and Grade [10 pointa Programming Assignment 4 (15+10-25 points) Problem Statement Review Problem 4 in Programming Challenges at th end of Chapter 3 (page 181) Assigned: Tuesday, Week #7 Due: Thursday, Week #8 Purpose To experience usage of decision structures. and formatting using printf when displaying double-type values in the output. Additional requirement: obtain student's name (full name, with last name, followed by a comma, and first name) Display full name in the output as shown below ht prejest Part A: Computation of Body Mass Index and interpretation of the result [15 points)] Ask the student's name and save it. Obtain three test scores that may contain decimal fractions (not whole numbers). Read input from console keyboard input using Scanner class. Calculate the grade using nested if-else if statements presented in Chapter 3. Declare a double variable (to be named as average) and save average of three scores. Declare two character variables: grade (for storing the letter grade), and initial for storing the first character of the last name of the student (e.g. name.charAt0)). Produce the output as follows Problem Statement Review Problem 3 in Programming Challenges at the end of Chapter 3 (page 181) Ask the person's name and save it in a String variable. Then ask that person for weight in pounds, and height in inches and save them in appropriately mamed variables (with proper type, hint: in this case both are double as they can receive inputs that contain fractions also, not necessarily whole numbers). Sample output (Line numbers are shown for guidance - need not appear in output) Welcome to ers>'s Grade Reporting Service Line 1 Line2: surnan Calculate BMI and display its value and diagnosis as shown below: Line6 Line 7: Line 8: Line 9 Line 10: Line 11 Linel2 Line 13: Line 14: Hello Soloaw.Your records are stored under file:n Your test score information is Score 1 Score 2 Score 3- Average = Your Grade= blank line given below: Cuse 48.2 f format field for data> Cuse 68.2 f format field for data> cuse 63.2 fformat field for data> Cuse 963.2 f format field for data> Sample output (Line numbers are shown for guidance-need not appear in guuitput) Welcome to gour 's Clinic Line 1 Line2: Line4 Line5 Line6: Line 7 Line 8: Line 9 Line 10 Hello eperaan'same Your height in inchea.xxxxxx qse %8.4 f format field for dat.> Your weight in pounds: 88&XXKK qse68.4 f format field for data> Your BMI is calculated a3 Our Diagnosis For your height and weight, BM is k you for using our service! Come back agai!! ose 168.4 f format field for data> What to submit Test the program with different values of inputs that produces all different diagnosis outputs for all cases. Submit Prog4Ijava and Output41 docz-Copy and paste output onto toa word document for several runs as described abore What to Submit: the source code you developed for PA4a (wih jaaon Blackboard Submit PA4a output. doex which should contain ouput for 4 different opes of inputs, showing optimal, ove eight and undens Submit Prog4b java and Output4b docs-Copy and paste output onto to a word document for several runs as described abore. usual or i r choic

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions