static void Main(string[] args) { Student stud1 = new Student(); stud1.FirstName = "Ben"; stud1.LastName = "Henke"; stud1.StudenID = 1800; stud1.ExamGrades = new List <double>() { 90, 90, 100, 90, 90 }; stud1.FinalExamGrades = new List <double>() { 90, 10, 52, 33, 10 }; stud1.HomeworkGrades = new List <double>() { 90, 69, 79, 99, 59 }; stud1.ParticipationGrades = new List <double>() { 10, 95, 10, 95, 10 }; stud1.QuizGrades = new List <double>() { 97, 95, 90, 65, 75 }; Console.WriteLine(stud1); Console.WriteLine("Exam Average is {0}", stud1.CalculateExamAverage()); Console.WriteLine("Final Exam Average is {0}", stud1.CalculateFinalExamAverage()); Console.WriteLine("Homework Average is {0}", stud1.CalculateHomeworkAverage()); Console.WriteLine("Participation Average is {0}", stud1.CalculateParticipationAverage()); Console.WriteLine("Quiz Average is {0}", stud1.CalculateQuizAverage()); Console.WriteLine(); Student stud2 = new Student(); stud2.FirstName = "Cale"; stud2.LastName = "Reinking"; stud2.StudenID = 1801; stud2.ExamGrades = new List <double>() { 99, 91, 100, 99, 99 }; stud2.FinalExamGrades = new List <double>() { 99, 100, 52, 33, 100 }; stud2.HomeworkGrades = new List <double>() { 99, 79, 69, 59, 49 }; stud2.ParticipationGrades = new List <double>() { 100, 90, 100, 90, 100 }; stud2.QuizGrades = new List <double>() { 87, 95, 100, 75, 65 }; Console.WriteLine(stud2); Console.WriteLine("Exam Average is {0}", stud2.CalculateExamAverage()); Console.WriteLine("Final Exam Average is {0}", stud2.CalculateFinalExamAverage()); Console.WriteLine("Homework Average is {0}", stud2.CalculateHomeworkAverage()); Console.WriteLine("Participation Average is {0}", stud2.CalculateParticipationAverage()); Console.WriteLine("Quiz Average is {0}", stud2.CalculateQuizAverage()); Console.WriteLine(); Student stud3 = new Student(); stud3.FirstName = "Meri"; stud3.LastName = "Santonomero"; stud3.StudenID = 1802; stud3.ExamGrades = new List <double>() { 90, 97, 90, 90, 90 }; stud3.FinalExamGrades = new List <double>() { 90, 100, 52, 93, 100 }; stud3.HomeworkGrades = new List <double>() { 97, 69, 69, 50, 99 }; stud3.ParticipationGrades = new List <double>() { 24, 90, 10, 90, 10 }; stud3.QuizGrades = new List <double>() { 97, 95, 98, 75, 98 }; Console.WriteLine(stud3); Console.WriteLine("Exam Average is {0}", stud3.CalculateExamAverage()); Console.WriteLine("Final Exam Average is {0}", stud3.CalculateFinalExamAverage()); Console.WriteLine("Homework Average is {0}", stud3.CalculateHomeworkAverage()); Console.WriteLine("Participation Average is {0}", stud3.CalculateParticipationAverage()); Console.WriteLine("Quiz Average is {0}", stud3.CalculateQuizAverage()); Console.WriteLine(); Console.ReadKey(); }
static void Main(string[] args) { Student myStudent = new Student(); myStudent.FirstName = "Kevin"; myStudent.LastName = "Duong"; myStudent.StudentID = 113101551; myStudent.ExamGrades = new List <double>(); myStudent.ExamGrades.Add(88); myStudent.ExamGrades.Add(96); myStudent.ExamGrades.Add(90); myStudent.FinalExamGrades = new List <double>(); myStudent.FinalExamGrades.Add(90); myStudent.HomeworkGrades = new List <double>(); myStudent.HomeworkGrades.Add(100); myStudent.HomeworkGrades.Add(95); myStudent.HomeworkGrades.Add(97); myStudent.ParticipationGrades = new List <double>(); myStudent.ParticipationGrades.Add(100); myStudent.ParticipationGrades.Add(80); myStudent.ParticipationGrades.Add(100); myStudent.QuizGrades = new List <double>(); myStudent.QuizGrades.Add(70); myStudent.QuizGrades.Add(90); myStudent.QuizGrades.Add(95); Console.WriteLine(myStudent.ToString().ToUpper()); Console.WriteLine($"Exam Average: {myStudent.CalculateExamAverage().ToString("P2")}"); Console.WriteLine($"Final Exam Average: {myStudent.CalculateFinalExamAverage().ToString("P2")}"); Console.WriteLine($"Homework Average: {myStudent.CalculateHomeworkAverage().ToString("P2")}"); Console.WriteLine($"Participation Average: {myStudent.CalculateParticipationAverage().ToString("P2")}"); Console.WriteLine($"Quiz Average: {myStudent.CalculateQuizGrade().ToString("P2")}"); Student theStudent = new Student(); theStudent.FirstName = "Jonathon"; theStudent.LastName = "Cline"; theStudent.StudentID = 113346657; theStudent.ExamGrades = new List <double>(); theStudent.ExamGrades.Add(90); theStudent.ExamGrades.Add(65); theStudent.ExamGrades.Add(82); theStudent.FinalExamGrades = new List <double>(); theStudent.FinalExamGrades.Add(86); theStudent.HomeworkGrades = new List <double>(); theStudent.HomeworkGrades.Add(84); theStudent.HomeworkGrades.Add(91); theStudent.HomeworkGrades.Add(97); theStudent.ParticipationGrades = new List <double>(); theStudent.ParticipationGrades.Add(100); theStudent.ParticipationGrades.Add(100); theStudent.ParticipationGrades.Add(100); theStudent.QuizGrades = new List <double>(); theStudent.QuizGrades.Add(60); theStudent.QuizGrades.Add(83); theStudent.QuizGrades.Add(78); theStudent.QuizGrades.Add(91); Console.WriteLine(); Console.WriteLine(theStudent.ToString().ToUpper()); Console.WriteLine($"Exam Average: {theStudent.CalculateExamAverage().ToString("P2")}"); Console.WriteLine($"Final Exam Average: {theStudent.CalculateFinalExamAverage().ToString("P2")}"); Console.WriteLine($"Homework Average: {theStudent.CalculateHomeworkAverage().ToString("P2")}"); Console.WriteLine($"Participation Average: {theStudent.CalculateParticipationAverage().ToString("P2")}"); Console.WriteLine($"Quiz Average: {theStudent.CalculateQuizGrade().ToString("P2")}"); Student aStudent = new Student(); aStudent.FirstName = "Parker"; aStudent.LastName = "Austin"; aStudent.StudentID = 113768502; aStudent.ExamGrades = new List <double>(); aStudent.ExamGrades.Add(65); aStudent.ExamGrades.Add(78); aStudent.ExamGrades.Add(83); aStudent.FinalExamGrades = new List <double>(); aStudent.FinalExamGrades.Add(81); aStudent.HomeworkGrades = new List <double>(); aStudent.HomeworkGrades.Add(100); aStudent.HomeworkGrades.Add(93); aStudent.HomeworkGrades.Add(97); aStudent.ParticipationGrades = new List <double>(); aStudent.ParticipationGrades.Add(100); aStudent.ParticipationGrades.Add(100); aStudent.ParticipationGrades.Add(100); aStudent.QuizGrades = new List <double>(); aStudent.QuizGrades.Add(90); aStudent.QuizGrades.Add(84); aStudent.QuizGrades.Add(87); Console.WriteLine(); Console.WriteLine(aStudent.ToString().ToUpper()); Console.WriteLine($"Exam Average: {aStudent.CalculateExamAverage().ToString("P2")}"); Console.WriteLine($"Final Exam Average: {aStudent.CalculateFinalExamAverage().ToString("P2")}"); Console.WriteLine($"Homework Average: {aStudent.CalculateHomeworkAverage().ToString("P2")}"); Console.WriteLine($"Participation Average: {aStudent.CalculateParticipationAverage().ToString("P2")}"); Console.WriteLine($"Quiz Average: {aStudent.CalculateQuizGrade().ToString("P2")}"); Console.ReadKey(); }