Activity selection problem

what is wrong with my code?

@nirupama1 use current_time variable which will tell whether current activity can be done or not, as it is not necessary that last activity was certainly chosen!


refer this as well