Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS ALL THE INFORMATION THAT YOU NEED ARE POSTED Topics: xlsread Q: A university asks you

PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS

ALL THE INFORMATION THAT YOU NEED ARE POSTED

Topics: xlsread

Q: 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 on 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

image text in transcribed

THE DATA :

credit sheet 1 ''data_program7''

image text in transcribed

Grades sheet 2 ''data_program7'

image text in transcribed

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

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

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

Why is employee referral so important in the recruitment process?

Answered: 1 week ago

Question

1. What are your creative strengths?

Answered: 1 week ago