Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program using java and translate a letter grade into a number grade (0-4). Problem Description: Letter grades are A, B, C, D, F,

Write a program using java and translate a letter grade into a number grade (0-4). image text in transcribed
image text in transcribed
Problem Description: Letter grades are A, B, C, D, F, possibly followed by + or Their numeric values are 4, 3, 2, 1 and 0 . There is no F+F - or A+.A"t" "increases the numeric value by 0.3 and a "-" decreases it by.3. Write a program that translates a letter grade into a number grade (04). - Use constants to assign the double (numeric) value to each letter value. Ie. B_VALUE = 3.0; - Use the String variable grade to hold the input. Then use grade.charAt() to obtain the letter grade for your conversion logic. - Next, using the grade.length() statement, check to see how many chars are in the string. - If it has 1 character in it then it will not have a " + " or "-" and will not need further calculation. - If it has 2 characters then the second character will either be " + " or "-". check to see how many chars are in the string. - If it has 1 character in it then it will not have a " + " or "-" and will not need further calculation. - If it has 2 characters then the second character will either be " + " or "-". - Using the information above, either add 0.3 or subtract 0.3 from the numeric equivalent of the letter. Input: - Letter Grade Output: - The 4 point scale value See the output below of the program that I wrote using these instructions. Enter letter grade: C+ IThe

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions