made use of virtual functions and written a process file function.