Finally assignment 5 done after writing the implementation of checkCategory()