Question: Activity Brief: Timer Reminder System Using Events Objective: Create a simple console application where users can set reminders for specific intervals. The system uses events
Activity Brief: Timer Reminder System Using Events
Objective:
Create a simple console application where users can set reminders for specific intervals. The system uses events to notify the user when a timer expires. This activity is designed to be completed in a few hours and provides handson experience with eventdriven programming.
Scenario:
Imagine a basic timer system where a user can set reminders. For example, a user sets a second timer to remind them to check the oven. Once the timer expires, the system triggers an event to notify the user.
You will implement this reminder system using events.
Requirements:
Create a Timer Class:
The Timer class should:
Allow a user to set a time interval in secondsStart counting down asynchronously eg using a Task or ThreadTrigger an event TimerExpired when the countdown reaches zero.
Define the Event:
The TimerExpired event should include a message that informs the user the timer has expired, along with the name of the timer eg "Reminder: Check the oven timer has expired!"
Implement a User Class:
The User class should:
Subscribe to the TimerExpired event.Print the reminder message to the console when the event is triggered.
Simulate the System:
In the console interface:
Allow the user to create multiple timers by providing a name and interval.Start the timers immediately.Notify the user as each timer expires. can you please code this in C# windows form application code including the designer files and logic.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
