Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C#: Create a delegate called UpdateGpaDelegate. Next, create a class called Student with id, name, and gpa fields. The class also includes an event that

C#:

Create a delegate called UpdateGpaDelegate. Next, create a class called Student with id, name, and gpa fields. The class also includes an event that is of the UpdateGpaDelegate type. When a student's gpa is increased, it will be displayed in red font. When a student's gpa is decreased, it will display the font in blue.

Demonstrate the class by creating three student objects with data you make up. Display the student data on the console screen. Then, update each student's gpa. Make sure that one student's gpa is increased, one decreased, and one not changed. Finally, display the student data again. You should see the font change to red for the first student, blue for the second, and the normal color for the last student. (Hint: use two events, one to handle gpa increases, the other to handle gpa decreases).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions