Use Java to write a Runnable object called EventTimer that p…
Questions
Use Jаvа tо write а Runnable оbject called EventTimer that periоdically calls a method, sendNotice(). The EventTimer constructor must have two arguments: a reference to an object that implements the Notifier interface (see below) and an long integer representing the approximate delay in milliseconds between calls to sendNotice(). The EventTimer run() method must call sendNotice() using the Notifier instance provided to the constructor. NOTE: Do not write a main method.public interface Notifier { public void sendNotice();} An example of how the EventTimer object might be used follows. You may assume that the Notifier object is instantiated correctly and that the integer is greater than 0.Notifier notifier = NotifierFactory.getNotifier();EventTimer timer = new EventTimer(notifier, 500);new Thread(timer).start();