Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MATLAB program that reads a data file (Lab4. dat), where each line contains a student's ID, the student's grades on Exam 1, Exam

image text in transcribed
Write a MATLAB program that reads a data file (Lab4. dat), where each line contains a student's ID, the student's grades on Exam 1, Exam 2, the Final Exam and the Lab, the student's current quality points earned, and the student's current semester hours earned. For each student, the program will do the following: 1) Calculate the semester grade as follows: Exam 1 counts 20% of the semester grade. Exam 2 counts 256 of the semester grade. The Final Exam counts 45% of the semester grade. The Lab counts 15% of the semester grade. 2) Calculate the quality points for this course as: Quality Points = 3* ceil((semester grade - 59)/10) 3) Calculate the total quality points as the quality points already earned plus the quality points for this course. 3) Calculate the total semester hours as the semester hours already earned plus the semester hours for this course which is 3. 5) Calculate the GPA as total quality points divided by total semester hours. 6) Print the ID, the grades on Exam 1, Exam 2, the Final Exam and the Lab, the semester grade, and the GPA. The program will also calculate and print the average Exam 1 grade, Exam 2 grade, Final Exam grade, Lab grade, semester grade, and GPA. The output of this program should look like this: ID=4681 Ei=67 E2=73 Final=78 Lab=81 Grade=78.90 GPA=2.125 ID=5932 E1=94 E2=89 Final=97 Lab=85 Grade=97.45 GPA=3.375 ID=7456 El=65 E2=71 Final=55 Lab-68 Grade 65.70 GPA-1.372 ID=2814 Ei=81 E2-87 Final=75 Lab=94 Grade=85.80 GPA-2.425 ID=3267 E1=76 E2=82 Final=64 Lab=79 Grade-76.35 GPA=2.314 ID=9548 E1=79 E2=88 Final=92 Lab=86 Grade=92.10 GPA=3.500 ID=6375 E1=98 E2=86 Final=94 Lab=B9 Grade=96.75 GPA=3.793 ID=8193 E1=86 E2=75 Final=93 Lab=88 Grade=91.00 GPA=3.300 Average El = 80.75 Average E2 = 81.38 Average Final = 81.00 Average Lab = 83.75 Average Grade = 85.51 Average GPA = 2.776 Write a MATLAB program that reads a data file (Lab4. dat), where each line contains a student's ID, the student's grades on Exam 1, Exam 2, the Final Exam and the Lab, the student's current quality points earned, and the student's current semester hours earned. For each student, the program will do the following: 1) Calculate the semester grade as follows: Exam 1 counts 20% of the semester grade. Exam 2 counts 256 of the semester grade. The Final Exam counts 45% of the semester grade. The Lab counts 15% of the semester grade. 2) Calculate the quality points for this course as: Quality Points = 3* ceil((semester grade - 59)/10) 3) Calculate the total quality points as the quality points already earned plus the quality points for this course. 3) Calculate the total semester hours as the semester hours already earned plus the semester hours for this course which is 3. 5) Calculate the GPA as total quality points divided by total semester hours. 6) Print the ID, the grades on Exam 1, Exam 2, the Final Exam and the Lab, the semester grade, and the GPA. The program will also calculate and print the average Exam 1 grade, Exam 2 grade, Final Exam grade, Lab grade, semester grade, and GPA. The output of this program should look like this: ID=4681 Ei=67 E2=73 Final=78 Lab=81 Grade=78.90 GPA=2.125 ID=5932 E1=94 E2=89 Final=97 Lab=85 Grade=97.45 GPA=3.375 ID=7456 El=65 E2=71 Final=55 Lab-68 Grade 65.70 GPA-1.372 ID=2814 Ei=81 E2-87 Final=75 Lab=94 Grade=85.80 GPA-2.425 ID=3267 E1=76 E2=82 Final=64 Lab=79 Grade-76.35 GPA=2.314 ID=9548 E1=79 E2=88 Final=92 Lab=86 Grade=92.10 GPA=3.500 ID=6375 E1=98 E2=86 Final=94 Lab=B9 Grade=96.75 GPA=3.793 ID=8193 E1=86 E2=75 Final=93 Lab=88 Grade=91.00 GPA=3.300 Average El = 80.75 Average E2 = 81.38 Average Final = 81.00 Average Lab = 83.75 Average Grade = 85.51 Average GPA = 2.776

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

=+2. Identify and analyze your audience.

Answered: 1 week ago

Question

=+3. Define the main idea.

Answered: 1 week ago