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

Design and implement a class that allows a teacher to track the grades in a sing

ID: 3787786 • Letter: D

Question

Design and implement a class that allows a teacher to track the grades in a single course. Include methods that calculate the average grade, the highest grade, and the lowest grade. Write a program to test your class implementation. Modify Exercise 1 so that the class can keep track of multiple courses. Write a program to test your implementation. Rewrite Exercise 1 using an ArrayList. Write a program to test your implementation and compare its performance to that of the array implementation in Exercise 1 using the Timing class. Design and implement a class that uses an array to mimic the behavior of the ArrayList class. Include as many methods from the ArrayList class as possible. Write a program to test your implementation.

Explanation / Answer

using System;
   using System.Collections.Generic;
   using System.Linq;
   using System.Text;// Declaring the libraries
namespace marks1
{
class program
  {
static void Main (string[]args)
{
int a, b1, b2, b3, t;
float p;
string c;
Console.writeln("Enter your roll no");
r = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Student Name :");
n.Console.readLine();
Console.WriteLine("Mark of Subject1 : ");
m1 = Convert.ToInt32(Console.ReadLine());//This would help the user to read the line

Console.WriteLine("Mark of Subject1 : ");
m2 = Convert.ToInt32(Console.ReadLine());//This would help the user to read the line of the subject 2 marks entered
Console.WriteLine("Mark of Subject2 : ");
m3 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Mark of Subject3 : ");
b = m1 + m2 + m3;
Console.WriteLine("Total : " + t);
Console.WriteLine("Percentage : " + p);
if p>=35 && p<=50
{
Console.WriteLine("Grade is C");
}

if p>=51 && p<=60

{
Console.WriteLine("Grade is B");
}{
if p>=61 && p<=80
{
Console.WriteLine("Grade is A");
}
Console.Readline();

}

average=total/count6;( This would give the average for the number of subjects)

}

}
_______________________________________________________________

Using of arrays list in the program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class program
{

public void sumAverageElements(int[] arr, int size)
{
int sum = 0;
int average = 0;

for (int i = 0; i < size; i++)
{

sum += arr[i];

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