// main method begins prgoram execution //static can be called without creating an object public static void Main(string[] args) { // create a gradebook object Gradebook GradeBook1 = new Gradebook( //invokes constructor name: "COP 2360: Programming in C#", name2: "Prof. April Graves" ); //constructor // display initial value of courseName for each Gradebook GradeBook1.DisplayMessage(); Console.ReadLine(); // output a blank line }
static void Main(string[] args) { //rectangular array of student grades int[,] gradesArray = { { 87, 96, 70 }, { 68, 87, 90 }, { 94, 100, 90 }, { 100, 81, 82 }, { 83, 65, 85 }, { 78, 87, 65 }, { 85, 75, 83 }, { 91, 94, 100 }, { 76, 72, 84 }, { 87, 93, 73 }, }; Gradebook myGradeBook = new Gradebook("CS5 Introduction" + "to C++", gradesArray); myGradeBook.DisplayMessage(); myGradeBook.ProcessGrades(); }