Aspire Systems interview question

OOPS concepts and String based code we should solve by without using inbuilt functions and prime number