Datamato interview question

write a code for interface