Added Abstract class

Added Abstract class form,
Modified contacts class to manage db connection
Add functionalities  in abstract class to manage the contact actions