Question: Instructions: 1 . The first task is to create a watcher that will monitor changes to a folder / directory . You need to monitor
Instructions:
The first task is to create a watcher that will monitor changes to a folderdirectory You
need to monitor for the following three kinds of changes: addition of a filedirectory
deletion of a filedirectory and changes to a file eg file size changes Directory can
contain other directories and files.
The watcher can be considered as a subject in the observer design pattern. You need to
implement one observer that will print a short description of the changes when get notified
example can be like: File A is added Your program should be written in Java. You need
to use the java.util.Observable class and java.util.Observer interface to complete the
program. Total Marks:
Your second task is to apply the iterator design pattern to traverse through the nodes of a
binary search tree and print node information. Each node in the tree represents a student
record, consisting of first name, last name, department and student id represented as an
integer number and use that as a key Your program should visit the nodes in preorder,
inorder or post order traversal mechanism. Thus, your program should create three
different iterators to traverse the tree in three different ways. Your program should be
written in Java and you need to use java.util.Iterator interface to complete the program
Total Marks:
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
