Pregunta de entrevista de Banco Bradesco

basic OOPs and 2 question on string manipulation