Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MATLAB. Create an algorithm to allow the user to enter a list of courses they have taken along with the grades received and the

Using MATLAB. Create an algorithm to allow the user to enter a list of courses they have taken along with the grades received and the credit hours for each course, and then calculate the users GPA. The program should first ask the user to type either Yes or No in response to the question, Do you want to enter a grade? If the answer is Yes, the user should be asked to enter the name of the course (text), the grade in the course (A, B, C, D, or F), and the number of credit hours for the course (a positive integer). If the user enters an invalid grade or an invalid number for the credit hours, he or she should be warned and asked to try again a maximum of three times, after which an appropriate error message should be generated and the program terminated. If they successfully enter the information for a course, the course name, the letter grade, and the credit hours should be displayed in a single row on the screen in an appropriate format, and then they should be asked again if they wish to enter a grade, and the entire process repeats if they answer Yes. If they answer No, the GPA should be calculated and displayed in an appropriate format, and then the program terminated unless no grades were entered (they typed No the first time) in which case an appropriate message should be generated and the program terminated.

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

Step: 3

blur-text-image

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions