Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 Use a switch statement to write the following program: Using C++ The program prompts the user for a letter grade (of type char).

Question 2

Use a

switch statement

to write the following program: Using C++

The program prompts the user for a letter grade (of type char). The list of valid letter grades

is:

A

B

C

D

E

F

The program should consider both lower and upper case

The program will then display the following messages:

For grade A: display Excellent

For grade B: display Good

For Grade C: display Average

For grade D or E: display Below Average

For Grade F: display Fail

For any other letter grade entered by users: display Invalid Grade

Your test plan should include tests for each possible output, invalid input, and lowercase

letters.

Provide a total of 4 test cases:

-

You can choose a mix of test cases with uppercase inputs A, B, C, D, E, F or

lowercase inputs a, b, c, d, e, f.

-

1 invalid test case (provide a letter that is not within [A,F] or [a,f])

Test #

Valid / Invalid Data

Description of test

Input Value

Actual Output

Test Pass / Fail

1

Valid

Pass

2

Valid

Pass

3

Valid

Pass

4

Invalid

Pass

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_2

Step: 3

blur-text-image_3

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 Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

Repeat Exercise using the followingtable: 28 18

Answered: 1 week ago

Question

16.5 Describe the five steps in a union organizing campaign.

Answered: 1 week ago

Question

What are the determinants of cash cycle ? Explain

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago