Write a switch statement to convert a letter grade into an equivalent numeric value on a fourpoint
Question:
Write a switch statement to convert a letter grade into an equivalent numeric value on a fourpoint scale. Set the value of the variable gradeValue to 4.0 for an A, 3.0 for a B, 2.0 for a C, 1.0 for a D, and 0.0 for an F. For any other letter, set the value to 0.0 and display an error message.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 71% (14 reviews)
switchletter case A gradeValue 40 break case ...View the full answer
Answered By
Susan Juma
I'm available and reachable 24/7. I have high experience in helping students with their assignments, proposals, and dissertations. Most importantly, I'm a professional accountant and I can handle all kinds of accounting and finance problems.
4.40+
15+ Reviews
45+ Question Solved
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Question Posted:
Students also viewed these Computer science questions
-
Repeat the previous exercise, but define an enumeration and use it within the switch statement. Previous exercise Imagine a program that displays a menu of five possible choices, lettered a through...
-
a) The use of computers in education is referred to as computer-assisted instruction (CAI). Write a program that will help an elementary school student learn multiplication. Use the rand function to...
-
Imagine a program that displays a menu of five possible choices, lettered a through e. Suppose the users selection is read into the character variable choice. Write a switch statement that reacts to...
-
While you may not work for a large corporation, there is merit to the notion that the organization must speak with one voice and speak quickly in a crisis. What forces (tradition, practice, and...
-
Methane (CH4) is burned in the presence of diatomic oxygen. The combustion products consist of water vapor and carbon dioxide gas. Determine the mass of water vapor generated when 1 lbm of methane is...
-
This question has two parts Part 1 Conduct a three-stage ROE Decomposition for this company. Return on Equity (ROE) .12 Dividends: $288 Accounts Payable: $900 Average Days Payable: 33 Total...
-
You toss a coin and randomly select a number from 0 to 9. What is the probability of getting tails and selecting a 3?
-
E-books, an online book retailer, has two operating divisions-corporate sales and consumer sales-and two support divisions-human resources and information systems. Each sales division conducts...
-
help asap with explanation please Saved er 14 homework 0 m A company issued 7%, 20-year bonds with a face amount of $90 million. The market yield for bonds of similar risk and maturity is 7% Interest...
-
Jimmy owns a garden in which he has planted N trees in a row. After a few years, the trees have grown up and now they have different heights. Jimmy pays much attention to the aesthetics of his...
-
The following flowchart contains a series of questions to determine what kind of haircut to get. Write a program that asks the questions to the user and outputs the recommended haircut based on the...
-
Consider the previous question, but include + or letter grades. A+ is 4.25, A is 3.75, B+ is 3.25, B is 2.75, and so on. a. Why cant we use one switch statement with no other conditionals to convert...
-
More than four years after they were married, George Woy sought an annulment of his marriage to Linda Woy on the basis of fraud. In his petition he alleged that at the time of the marriage ceremony...
-
A certain random process \(U(t)\) takes on equally probable values +1 or 0 with changes occurring randomly in time. The probability that \(n\) changes occur in time \(\tau\) is known to be \[...
-
The focal points of the two converging lenses shown in Figure P33.121 are denoted by solid dots for the left lens and open dots for the right lens. Draw a simplified ray diagram to locate the final...
-
Suppose that country A has 9,000 worker hours available for production and that it initially has the technology given by case 3 of Exercise 1. Derive its PPF and determine its exact dimensions. data...
-
The table shows experimental values of the variables x and y. The variables are known to be related by the equation y = a e nx where a and n are constants. a. Draw the graph of ln y against x. b....
-
Construct the Nyquist diagram for a single-degree-of-freedom system with hysteretic damping.
-
Simplify the following. (t 6 ) 1/3
-
The process of collaborative goal setting by a manager and subordinate, the extent to which goals are accomplished is a major factor in evaluating and rewarding the subordinate's performance. It is...
-
To support multiple virtual machines, two levels of memory virtualization are needed. Each virtual machine still controls the mapping of virtual address (VA) to physical address (PA), while the...
-
One of the biggest impediments to widespread use of virtual machines is the performance overhead incurred by running a virtual machine. Listed below are various performance parameters and application...
-
In this exercise, we will explore the control unit for a cache controller for a processor with a write buffer. Use the finite state machine found in Figure 5.40 as a starting point for designing your...
-
BE13.2 (LO 1), AP An inexperienced accountant for Silva Corporation showed the following in the income statement: net income \$337,500 and unrealized gain on availablefor-sale securities (before...
-
A start - up company is seeking $ 5 m for its Series A investment round. The start - up is expected to grow to $ 1 0 0 M in sales and $ 1 0 M in profit by year 5 . Comparable firms in the industry...
-
Here are the cash flows for a project under consideration: C 0 C 1 C 2 $8,010 +$5,940 +$20,160 a. Calculate the projects net present value for discount rates of 0, 50%, and 100%. (Round your answers...
Study smarter with the SolutionInn App