Ask the user if they are taking a class (enter y, Y, n or N). 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 any character other than Y, y, N or n print “Invalid input” and close. This should work regardless of capital or lowercase inputs. Use if / else if / else for this part.
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 uppercase or lowercase A or B, print “Great Job!” If they enter uppercase or lowercase C print “You’re doing alright.” If they enter uppercase or lowercase 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).
Test Cases
Test Case 1:
Are you taking a class?: <N> Thank you for using the system.
Test Case 2:
Are you taking a class?: <n> Thank you for using the system.
Test Case 3: Are you taking a class?: <Z> Invalid Input.
Test Case 4:
Are you taking a class?: <y> Please enter a grade: <a> Great Job!
Test Case 5:
Are you taking a class?: <Y> Please enter a grade: <B> Great Job!
Test Case 6:
Are you taking a class?: <Y> Please enter a grade: <C> You’re doing alright.
Test Case 7:
Are you taking a class?: <Y> Please enter a grade: <D> You can improve.
Test Case 8:
Are you taking a class?: <Y> Please enter a grade: <F> You can improve.
Test Case 9:
Are you taking a class?: <Y> Please enter a grade: <X> Invalid grade.

![[SOLVED] Cs150 – hw1 – if/switch](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[SOLVED] Cs150 – create a program that asks the user to enter two integer numbers, then tells the user: the sum of the numbers, the difference of the numbers (first minus second), the product of the numbers, and the quotient of the numbers with remainder. each of these should be output as a separate line and include the equation. sample output:](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.