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

can anyone help me on C# program I would like you to write a small program to il

ID: 3536927 • Letter: C

Question

can anyone help me on C# program
I would like you to write a small program to illustrate the concepts of overloading. You can use what we have been working on up to this point.

You will have two classes.
The first class is the Program class, this class will have the main method in it and you will call the overloaded methods from this class.

The second class is called: Grade.
This class will have two static methods in it that will be overloaded.
Both of these methods are called GradeAverage the first one will return an int and have three parameters of type int, the second will return a double and have two parameters of type double.
Both methods will calculate an average of the numbers passed into them and return the result.

In the Main method you will ask for the needed values for both methods -- you can use any of the classes already created.

then just simply call both method passing in the correct values and display the results as follows:
The first method returned ______ value
The second method returned ____ value

Explanation / Answer

using System;

class Program

{

public static void Main(String[] args)

{

Grade gObject=new Grade();

Console.WriteLine("Enter 3 integers for first function, one per line");

int a =int.Parse(Console.ReadLine());

int b =int.Parse(Console.ReadLine());

int c =int.Parse(Console.ReadLine());

Console.WriteLine("Enter 2 floating point digits for first function, one per line");

double d =double.Parse(Console.ReadLine());

double e =double.Parse(Console.ReadLine());

Console.WriteLine("The first function returns " + gObject.GradeAverage(a,b,c) +" value");

  Console.WriteLine("The second function returns " + gObject.GradeAverage(d,e) +" value");

}


  

}


class Grade

{

public static int GradeAverage( int a,int b,int c)

{

return ((a+b+c)/3);

}

public static double GradeAverage( double a, double b)

{

return ((a+b)/2);

}