ENGR 109 ntroduction of Engineering Science Computing Final

ENGR 109 ntroduction of Engineering Science & Computing Final Project Project requirements: 1. Read the following question and fully understand it. 2. Create a computer program in a script file by using MATLAB only. 3. Write a project report with the following format by using Microsoft Word only. 4. Submit the script file and project report on Moodle before the due date. Question: The overall grade in a course is determined from the grades of 5 quizzes, 3 midterms, and a final, using the following scheme: Quizzes: Quizzes are graded on a scale from 0 to 10. The grade of the lowest quiz is dropped and the average of the 4 quizzes with the higher grades constitutes 25% of the course grade. Midterms: Midterms are graded on a scale from 0to 100. If the average of the midterm scores is higher than the score on the final, the average of the mid-terms is 35% of the course grade. If the final grade is higher than the average of the midterms, then the lowest midterm is dropped and the average of the two midterms with the higher grades is 35% of the course grade. Final: Finals are graded on a scale from 0 to 100. The final is 40% of the course grade. Write a computer program in a script filethat determines the course grade for a student. The program first asks the user to enter the five quiz grades (in a vector), the three midterm grades (in a vector), and the grade of the final. Then the program calculates a numerical course grade (a number between 0 and 100). Finally, the program assigns a letter grade according to the following key: Afor Grade 290, B for 80 s Grade s 90,C for 70 s Grade s 80, D for 60 s Grade s70, and F for a grade lower than 60. Execute the program for the following cases: (a) Quiz grades: 7,9, 4, 8, 7. Midterm grades: 93, 83, 87. Final grade: 89. (b) Quiz grades: 8, 6, 9, 6, 9. Midterm grades: 81, 75, 79. Final grade: 72.

Solution

clear all

close all

clc

grd=sort(input(\'Please enter five quiz grads in verctor form : \'));

mdtrmgrd=sort(input(\'Please enter three mid term grads in verctor form : \'));

fnlgrd=sort(input(\'Please enter final grad : \'));

if max(grd)>10 || min(grd)<0

disp(\'quiz grads should be 0 to 10 only\')

break

end

if max(mdtrmgrd)>100 || min(mdtrmgrd)<0

disp(\'mid term grads should be 0 to 100 only\')

break

end

if max(fnlgrd)>100 || min(fnlgrd)<0

disp(\'final grade should be 0 to 100 only\')

break

end

if size(grd,2)>5 || size(grd,2)<5

disp(\'quiz grads size should be 5 \')

break

end

if size(mdtrmgrd,2)>3 ||size(mdtrmgrd,2)<3

disp(\'mid term grads size should be 3 \')

break

end

if size(fnlgrd,2)>1 || size(fnlgrd,2)<1

disp(\'final grads size should be 1 \')

break

end

overallgrade=0;

grdavg=0;

mdtrmavg=0;

grdavg=((grd(2)+grd(3)+grd(4)+grd(5))/4);

mdtrmavg=((mdtrmgrd(1)+mdtrmgrd(2)+mdtrmgrd(3))/3);

if mdtrmavg>=fnlgrd

overallgrade=mdtrmavg+grdavg;

else

mdtrmavg=((mdtrmgrd(2)+mdtrmgrd(3))/2);

overallgrade=mdtrmavg+grdavg;

end

overallgrade=overallgrade+fnlgrd;

if overallgrade>=90

disp(\'Grade is: A\')

elseif overallgrade>=80 && overallgrade<90

disp(\'Grade is: B\')

elseif overallgrade>=70 && overallgrade<80

disp(\'Grade is: C\')

elseif overallgrade>=60 && overallgrade<70

disp(\'Grade is: D\')

else

disp(\'Grade is: F\')

end

SAMPLE outputs:

Please enter five quiz grads in verctor form : [1,4,5,3,5]

Please enter three mid term grads in verctor form : [10,20,15]

Please enter final grad : 30

Grade is: F

>>

Please enter five quiz grads in verctor form : [7,9,4,8,7]

Please enter three mid term grads in verctor form : [93,83,87]

Please enter final grad : 89

Grade is: A

>>

Please enter five quiz grads in verctor form : [8,6,9,6,9]

Please enter three mid term grads in verctor form : [81,75,79]

Please enter final grad : 72

Grade is: A

 ENGR 109 ntroduction of Engineering Science & Computing Final Project Project requirements: 1. Read the following question and fully understand it. 2. Crea
 ENGR 109 ntroduction of Engineering Science & Computing Final Project Project requirements: 1. Read the following question and fully understand it. 2. Crea
 ENGR 109 ntroduction of Engineering Science & Computing Final Project Project requirements: 1. Read the following question and fully understand it. 2. Crea

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site