Question: C# Given a class Student name, id , grades (list of grades) for simplicity you may make them public. Add a method GetAverageGrade to return
C# Given a class Student name, id , grades (list of grades) for simplicity you may make them public. Add a method GetAverageGrade to return the average of all the grades of that student. In Form1: create a Dictionary of Student Add 10 student to it, each with 5 grades Have a button to search for a student by id, get the student and display name and all the grades Have a button to remove a student by id Have a button to display all the students to a listview Define a method that return a student with the highest average grade Display the student.
Queue: write a method that takes a queue, then removes the last item only while maintaining the rest in queue in the same order they were before
Stack: write a method that takes a stack, then removes the last item (item at the bottom of the stack) while maintaing the rest of the item in their original positions)
Write a method that takes a Queue of ints, it empties the content of the queue into a stack, which it returns. the top element of the stack should be the same as the first element of the queue.
Create a Dictionary of students.
Use the id as the key. Add all the students to the dictionary
In a button click, get student id from user then use to get the student from the dictionary if found, otherwise say invalid id 10. In a button click, remove a student from the dictionary.
Display all the students in the dictionary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
