Assignment on String Method Implementation