This question was asked in Ex 6.5, 8
How should we do this type of methods 

Prathibha G's image