Order Grade A+ Academic Papers Instantly!

Computer Science homework help

Computer Science homework help. This assignment is about delegates, events, and lambda expressions.
This assignment will start with the attached file “CSD228_Assignment4_solution (1)”
You are to make the following changes:
Add a new class called ManagerEventArgs (similar to CarEventArgs in the attached file “Chap10”). Instead of a string, the ManagerEventArgs class defines two data members to hold references to the Manager and Employee passed to the AddReport method call. Change the constructor to take these two arguments and initialize the data members. Add a member virtual Message method to the ManagerEventArgs class that returns the following message string:
<name of manager> has <MaxReports> reports, can not add report <name of report>
Remove the TooManyReportsException you created in assignment 4, and replace it with a generic event using the EventHandler generic class with the ManagerEventArgs class you created in step 1. Change the AddReport method to raise this event where you previously used the TooManyReportsException, passing the manager and report from the AddReports method call to the ManagerEventArgs constructor. You should design your event so that one only need to register an event handler once to catch events on any managers (i.e., it is not necessary to register an event on every individual manager).
Change the static Main method to register three handlers for the TooManyReports immediately after the employee list is defined – one handler using the traditional delegate syntax (i.e., a static method in the Program class), one using the anonymous method delegate syntax, and one using a lambda expression. All three events should call the Message virtual method that you created in step 1 and print out the message to the console. Remove the catch block entirely, but keep the statements from the try block – just remove the ‘try’ keyword and the extra set of braces {} from the try block.
If done correctly, the same error message should be printed three times.

Computer Science homework help


15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.