Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Review the following scenario and complete the design. Scenario Professor Higgin

ID: 3579943 • Letter: R

Question

Review the following scenario and complete the design. Scenario Professor Higgins has asked you to design the logic that will be used to calculate final class averages and grades for his students. His grading algorithm is as follows. Exam average: 50% Quiz average: 25% Lab average: 25% The program will then determine the letter grade for each student using the following criteria. 90–100: A 80–89: B 70–79 C 60–69 D Less than 59 F Write a program using C#, prompt the user for the appropriate input, and display the output as described above. You may assume all data are valid. Provide a program introduction message that tells the user how to use the program.

Explanation / Answer

using System.IO;
using System;

class Program
{
static void Main()
{
  

Console.WriteLine( "Enter Exam average: " );
Double examAverage = Convert.ToDouble(Console.ReadLine());
Console.WriteLine( "Enter Quiz average: " );
Double quizAverage = Convert.ToDouble(Console.ReadLine());
Console.WriteLine( "EnterLab average: " );
Double labAverage = Convert.ToDouble(Console.ReadLine());
Double score = examAverage + quizAverage + labAverage;
if(score >= 90 && score <=100){
               Console.WriteLine("Letter grade: A");
           }
           else if(score >= 80 && score <90){
               Console.WriteLine("Letter grade: B");
           }
           else if(score >= 70 && score <80){
               Console.WriteLine("Letter grade: C");
           }
           else if(score >= 60 && score <70){
           Console.WriteLine("Letter grade: D");
           }
           else{
               Console.WriteLine("Letter grade: F");
           }
}
}

Output:

sh-4.3$ mcs *.cs -out:main.exe                                                                                                                                                                                                                         

sh-4.3$ mono main.exe                                                                                                                                                                                                                                  

Enter Exam average:                                                                                                                                                                                                                                    

45                                                                                                                                                                                                                                                     

Enter Quiz average:                                                                                                                                                                                                                                    

24                                                                                                                                                                                                                                                     

EnterLab average:                                                                                                                                                                                                                                      

19                                                                                                                                                                                                                                                     

Letter grade: B

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote