Main.C file is added which has complete solution. Usage of Monitoring.