Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ask the user if they are taking a class (enter yes or no). If they are not taking a class print Thanks for using the

Ask the user if they are taking a class (enter yes or no). If they are not taking a class print
Thanks for using the system. and close the program. If they are taking a class proceed to
ask for a grade as listed below. If the input is not yes or no print Invalid input and close.
This should work regardless of capital or lowercase inputs. Use if / else if / else for this part.
Hint: Force input to lowercase before testing.
If and only if the user is taking a class, ask them to enter a letter grade (A, B, C, D, or F,
uppercase or lowercase). If they enter A or B, print Great Job! If they enter C print Youre
doing alright. If they enter D or F print You can improve. If they enter anything else then
print Invalid grade. Regardless of input then close (including invalid). Use a switch
statement for this portion. Hint: remember cases can spill through until a break and
remember the default case. This should ONLY run if the user is taking a class! (Remember
nesting).

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

Students also viewed these Databases questions