KVP Business Solutions interview question

Pattern Program , count the character in given String , basic OOP's concept .