using static System.Console;
using System.Globalization;
try {ReportCard c1 = new ReportCard("Derek", 64, 76);}
catch(ArgumentException e) {WriteLine($"{"c1"} {e.Message}");}
try {ReportCard c2 = new ReportCard("Andre", 98, 90);}
catch(ArgumentException e) {WriteLine($"{"c2"} {e.Message}");}
try {ReportCard c3 = new ReportCard("Cooper", -25, 54);}
catch(ArgumentException e) {WriteLine($"{"c3"} {e.Message}");}
try {ReportCard c4 = new ReportCard("Jane", 120, 100);}
catch(ArgumentException e) {WriteLine($"{"c4"} {e.Message}");}
private char grade = 'F';
private const int LOWCAP = 0;
private const int HIGHCAP = 100;
public int[] scores = {90, 80, 70, 60};
public char[] grades = {'A', 'B', 'C', 'D'};
public ReportCard(string student, int mid, int fin)
if(mid < LOWCAP || mid > HIGHCAP)
throw(new ArgumentException());
else if(fin < LOWCAP || fin > HIGHCAP)
throw(new ArgumentException());
average = (mid + fin) / 2;
for(int x = scores.Length - 1; x >= 0; --x)
WriteLine($"{name}'s report card:");
WriteLine($" Midterm: {mid} Final: {fin}");
WriteLine($" Average: {average} Grade: {grade}");