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...
-
Which group has the greater ability to change an organizationsenior leaders or middle managers? Viewpoint: Senior leaders have far more impact and ability to change an organization for several...
-
Refer to the information in Exercise 17-7 to answer the following requirements. Required 1. Using ABC, compute the overhead cost per unit for each product line. 2. Determine the total cost per unit...
-
Cost allocation to divisions. Lenzig Corporation has three divisions: Pulp, Paper, and Fibers. Lenzigs new controller, Ari Bardem, is reviewing the allocation of fixed corporate-overhead costs to the...
-
The population in January 2 0 0 3 was estimated to be about 6 . 3 0 billion people. Assume that the population will continue to grow exponentially at the rate of about 1 . 3 % per year. Then the...
-
Assume an algorithm that takes log 2 n microseconds to solve a problem. Find the largest input size n such that the algorithm solves the problem in time in 24 days. a) 2 140000 b) 2 1440000 c) 2...
-
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...
-
The (less paradoxical) paradox of saving A chapter problem at the end of Chapter 3 considered the effect of a drop in consumer confidence on private saving and investment, when investment depended on...
-
A company has $750,000 in cash, $200,000 in marketable securities and $300,000 worth of accounts receivable. Its current assets are worth $1,500,000 and its current liabilities are $1,000,000. What...
-
Using relevant post-growth graphs, Differentiate the welfare outcomes for a small developing country using one of the following growth possibilities; Growth in the labour force versus growth in the...
-
Two former Kmart executives were indicted by a Detroit grand jury on federal charges of fraud, conspiracy and making false statements over their recording of a $42 million payment that resulted in an...
-
Explain the tax treatment of losses from sales or exchanges of property directly or indirectly between related parties (Section 267). How do you determine the basis of property received as a gift?...
-
Discuss three examples of ethical challenges that HR professionals may encounter as they apply to modern organizations. How you would address each situation? How could you approach the problem?
-
Groovy Limited began 2017 with $95,000 in cash. During 2017, Groovy earned net income of $300,000, and adjustments to reconcile net income to net cash provided by operations totaled $60,000, a...
-
5. Convert the following ERD to a relational model. SEATING RTABLE Seating ID Nbr of Guests Start TimeDate End TimeDate RTable Nbr RTable Nbr of Seats RTable Rating Uses EMPLOYEE Employee ID Emp...
-
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)
-
Prove each of the following statements. Fully state and explain each claim and logical step in your proof, using complete English sentences throughout. 1. Prove that if z is a complex number solution...
-
Preparing Adjusting Journal Entries Pacific Company adjusts and closes its books each December 31. It is now December 31 and the following information is available for preparing accounting...
-
Evaluate the integral below by interpreting it in terms of areas in the figure. The areas of the labeled regions are A17, A2=3, A3=1 and A4=2 V = 5 - S f(x)dx > Next Question y=f(x) A1 A3 0 3 A2 R2 5...
Study smarter with the SolutionInn App