Write a program that prompts the user to enter a letter grade A, B, C, D, or
Question:
Write a program that prompts the user to enter a letter grade A, B, C, D, or F and displays its corresponding numeric value 4, 3, 2, 1, or 0. Here is a sample run:
Transcribed Image Text:
Enter a letter grade: B The numeric value for grade B is 3 JEnter Enter a letter grade: T -FEnter T is an invalid grade
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 83% (12 reviews)
Program plan Create the class Lettergrade Define the main method Prompt the user to enter the grade ...View the full answer
Answered By
Morgan Njeri
Very Versatile especially in expressing Ideas in writings.
Passionate on my technical knowledge delivery.
Able to multitask and able to perform under pressure by handling multiple challenges that require time sensitive solution.
Writting articles and video editing.
Revise written materials to meet personal standards and satisfy clients demand.
Help Online Students with their course work.
4.90+
12+ Reviews
38+ Question Solved
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Programming Exercise 6.39 gives a method for testing whether three points are on the same line.Write the following method to test whether all the points in the array points are on the same...
-
Write a program that prompts the user to enter two strings and tests whether the second string is a substring of the first string. (Don?t use the indexOf method in the String class.) Analyze the time...
-
Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2012, the program should display that...
-
Joseph Kent started business on 1 July 2018 as a joiner making conservatories. His taxadjusted profits (before deduction of capital allowances) were as follows: Private use of both cars has been...
-
In this exercise we consider matching problems where there may be different numbers of men and women, so that it is impossible to match everyone with a member of the opposite gender. a) Extend the...
-
If the Parthenon in Greece is 60 ft tall (at the apex) and 97 ft wide, find the ratio of width to height and compare it with .
-
The geometric mean is often used in business and economics for finding average rates of change, average rates of growth, or average ratios. Given n values (all of which are positive), the geometric...
-
Oral Roberts Dental Supplies has annual sales of $5,200,000. Ninety percent are on credit. The firm has $559,000 in accounts receivable. Compute the value of the average collection period.
-
Additional Information for 2024: 1. Purchased Investment in bonds for $111,000. 2. Sold land for $27,400. The land originally was purchased for $36,000, resulting in a $8,600 loss being recorded at...
-
Over 500 million tweets are sent per day (digital Marketing ramblings website, December 15, 2014). Assume that the number of tweets per hour follows a Poisson distribution and that Bob receives on...
-
The international standard letter/number mapping found on the telephone is shown below: Write a program that prompts the user to enter a letter and displays its corresponding number. 2 abc 3 def 5 ik...
-
Write a program that prompts the user to enter a letter and check whether the letter is a vowel or consonant. Here is a sample run: Enter a letter: B B is a consonant JEnter Enter a letter grade: a a...
-
a) Compute the forward rate \(f(t, T, S)\) in the Ho-Lee model (17.48) with constant deterministic volatility. In the next questions we take \(a=0\). b) Compute the instantaneous forward rate \(f(t,...
-
1. Calculate the allowable torque that can be applied to a circular shaft. The allowable shear stress is 95.0 MPa. (a) Assume that the shaft is solid and had a 165-mm diameter. (b) Assume that the...
-
6. A 2-in diameter steel shaft is used as an axially loaded pin-connected compression member. The high-strength steel has a proportional limit of 50,000 psi and a modulus of elasticity of 30,000,000...
-
After a day of testing race cars, you decide to take your own 1550-kg car onto the test track. While moving down the track at 10.0 m/s, you uniformly accelerate to 30.0 m/s in 10.0 s. What is the...
-
Demonstrate the Function. Does it Continue? f(x, y, z)= = xy 9-y+z
-
2. Your client is also investigating the characteristics of another company, but does not have historical data for the evaluation process. However, information on the different sources of finance and...
-
A 75.0-kg man is riding an escalator in a shopping mall. The escalator moves the man at a constant velocity from ground level to the floor above, a vertical height of 4.60 m. What is the work done on...
-
Chris Zulliger was a chef at the Plaza Restaurant in the Snowbird Ski Resort in Utah. The restaurant is located at the base of a mountain. As a chef for the Plaza, Zulliger was instructed by his...
-
Write a program that displays a rectangle with upper-left corner point at (40, 40), width 50, and height 40. Enter the values in the text fields x and y and press the Translate button to translate...
-
Write a program that displays two eyes in an oval, as shown in Figure 31.49c. Exercise31 06 (c)
-
Write a program that creates two shapes: a circle and a path consisting of two cubic curves, as shown in Figure 31.49b. Exercise31 05 (b)
-
What advancements have been made in the field of constraint satisfaction algorithms, particularly within artificial intelligence research, to tackle combinatorial optimization problems with...
-
Martin Dimitrov got the idea for SnapClips in an entrepreneurship class during his junior year at Wheeling High School. what are some things that impress you about Martin's pitch and his company? (Be...
-
1.How did Brahe and Kepler's talents complement each other? 2. List four theories from Aristotle that Galileo disproved. 3. What does Kepler's Third Law tell us about the difference between the...
Study smarter with the SolutionInn App