Pergunta de entrevista da empresa Alarm.com

What is encapsulation? Create a program which reverses the order of words in a string.