private SpeechletResponse handleTellMeAJokeIntent(final Session session){
  String speechOutput="";
  String repromptText="You can ask, who's there";
  int jokeID=(int)Math.floor(Math.random() * JOKE_LIST.size());
  session.setAttribute(SESSION_STAGE,KNOCK_KNOCK_STAGE);
  session.setAttribute(SESSION_JOKE_ID,jokeID);
  speechOutput="Knock knock!";
  SimpleCard card=new SimpleCard();
  card.setTitle("Wise Guy");
  card.setContent(speechOutput);
  SpeechletResponse response=newAskResponse(speechOutput,false,repromptText,false);
  response.setCard(card);
  return response;
}

private SpeechletResponse handleTellMeAJokeIntent ( final Session session ) { String speechOutput = "" ; String repromptText = "You can ask, who's there" ; int jokeID = ( int ) Math . floor ( Math . random ( ) * JOKE_LIST . size ( ) ) ; session . setAttribute ( SESSION_STAGE , KNOCK_KNOCK_STAGE ) ; session . setAttribute ( SESSION_JOKE_ID , jokeID ) ; speechOutput = "Knock knock!" ; SimpleCard card = new SimpleCard ( ) ; card . setTitle ( "Wise Guy" ) ; card . setContent ( speechOutput ) ; SpeechletResponse response = newAskResponse ( speechOutput , false , repromptText , false ) ; response . setCard ( card ) ; return response ; }
selects a joke randomly and starts it off by saying " knock knock " .
