CirrusLabs interview question

What is encapsulation and write a program to find leap year.