#07 : Taj, Manali : Extracted logical code from mainActivity class.