The Worksheet named Cuestion 1 contains a place for students to record the grades they have received in their dlasses. Students put the number of each letter grade received in the B column. (For example, the worksheet currently shows that the student has taken 9 classes and made five As, one B, one C, one D, and one F as grades. You need to write a program that reads the grades from the worksheet and uses a function to calculate the student's GPA. For this problem you can assume that all classes are worth the same number of credit hours. (See the note at the end of the test if you don't know how to calculate GPA...but you should know that, it's important to you!) The function should send back the GPA to the calling procedure. The procedure will then put upa message box that gives the student their GPA and a message about their GPA, all in one message box. The message should be "You qualify for an internship" if the student has a GPA over 3.0. It should be "You're in the danger zone" if the GPA is between 2.0 and 3.0. And it should be "You are on probation." if the GPA is less than 2.0. The message box below is an example of what should be shown to the user. Do not worry about the formatting of the GPA. I won't grade that. If yours has lots of decimal places, that is OK. Microsoft Excel Your GPA is 2.89. You're in the danger zone. OK

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please write code that would run in VBA please show code in VBA
**Instructions for Calculating Student GPA Using Excel**

The worksheet labeled "Question 1" is designed for students to log the grades they received in their classes. In column B, students should enter the number of each letter grade earned. For instance, the example shows a student who has completed 9 classes, receiving five As, one B, one C, one D, and one F.

**Program Objective:**
You are tasked with writing a program that processes the grades from this worksheet to compute the student’s GPA. Assume each class carries the same number of credit hours (refer to the note at the end of the test if you are unsure about GPA calculations, but be aware this is crucial). The function you develop should return the GPA to the calling procedure.

**Output Requirements:**
The program must display a message box that includes the student’s GPA and an accompanying comment based on their GPA, all in one message box. The messages are as follows:

- "You qualify for an internship" for GPAs over 3.0.
- "You're in the danger zone" for GPAs between 2.0 and 3.0.
- "You are on probation" for GPAs below 2.0.

Below is an example of the message box the user should see:

---
**Microsoft Excel**

Your GPA is 2.89. You're in the danger zone.

[OK]
---

**Note:** Do not concern yourself with the formatting of the GPA. It will not be graded. It's acceptable if your GPA has many decimal places.

This setup helps students quickly assess their academic standing and take necessary actions to improve their performance.
Transcribed Image Text:**Instructions for Calculating Student GPA Using Excel** The worksheet labeled "Question 1" is designed for students to log the grades they received in their classes. In column B, students should enter the number of each letter grade earned. For instance, the example shows a student who has completed 9 classes, receiving five As, one B, one C, one D, and one F. **Program Objective:** You are tasked with writing a program that processes the grades from this worksheet to compute the student’s GPA. Assume each class carries the same number of credit hours (refer to the note at the end of the test if you are unsure about GPA calculations, but be aware this is crucial). The function you develop should return the GPA to the calling procedure. **Output Requirements:** The program must display a message box that includes the student’s GPA and an accompanying comment based on their GPA, all in one message box. The messages are as follows: - "You qualify for an internship" for GPAs over 3.0. - "You're in the danger zone" for GPAs between 2.0 and 3.0. - "You are on probation" for GPAs below 2.0. Below is an example of the message box the user should see: --- **Microsoft Excel** Your GPA is 2.89. You're in the danger zone. [OK] --- **Note:** Do not concern yourself with the formatting of the GPA. It will not be graded. It's acceptable if your GPA has many decimal places. This setup helps students quickly assess their academic standing and take necessary actions to improve their performance.
Expert Solution
Explanation:

Let's assume that credit hours is 1 hr for all the classes, so below is the logic of GPA

GPA = (Sum of the grade points obtained in all the classes * Credit of each class)/(Total Credit)

And let's assume if :
A is Grade  then Grade point is 9 out of 10
B is Grade  then Grade point is 8 out of 10
C is Grade  then Grade point is 7 out of 10
D is Grade  then Grade point is 6 out of 10
F is Grade  then Grade point is 4 out of 10

To implement logic used button to display the message box.

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education