Question: PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS ALL THE INFORMATION THAT YOU NEED ARE POSTED A university asks you to write a

PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS

ALL THE INFORMATION THAT YOU NEED ARE POSTED

A university asks you to write a program for calculating the GPA of some students. They have provided the dataset in an Excel file, data_program7. This Excel file includes two sheets: the first sheet is Credits which includes the number of credits each student took in each course, and the second sheet is Grades that includes the grades for each course for each student. Write a script and prompt the user to enter the name of the Excel file. Use xlsread function to read the data. Calculate the GPA for each student using the approach below: multiply the number of credits for each course by the related grade, add all of the resulted values together, and finally divide the calculated summation value by the total number of the credits. After calculating the GPA for all students, create a report for the user with the sorted GPAs in descending format and the corresponding names in two columns. The sample run has been provided for you at the next page.

Notes:

*Assign the name program7 to your script file.

*The related dataset has been uploaded on D2L with the name data_program7. You have to download it inside your current folder before running your code.

*The output of your program has to be completely similar to the sample provided for you at this file.

*You may need to use some of the below functions in your code:

Input

xlsread

diag

sum

sort

cell2mat

PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS ALL THE

THE DATA :

sheet 1

*Credits sheet ''data_program7''

INFORMATION THAT YOU NEED ARE POSTED A university asks you to write

Sheet 2

*Grades 'data_program7''

a program for calculating the GPA of some students. They have provided

*hint

script file: promp the user to enter the name of the excell file use xlsread function to read the data calculatioe the GPA for each student

A= Enter student name that you want to calculate his/her GPA

GPA for A = total (cridit*grade)/total sumition of cridit

[num,txt,raw]=xlstead ('data_program7.xlsx','credits') newtxt=cell2mat(txt) new=xlstead('data_program7.xlsx','credits','F5:I9') B=xlstead ('data_program7.xlsx','credits','H3:J9')

Sample run: Enter the name of the Excel dataset file: 'data program7.xlsx' **The GPA report is ready **** Names GPA 76.70 72.45 70.17 Benjamin68.89 67.82 67.74 Charlotte 64.65 63.20 57.64 55.22 Alex James William Amelia Emma Sophia Olivia Mason

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!