Problems on Object Oriented Programming using Python:
-
Create a class with name StringClass whihc should take string as an input from constructor.
It should have a method to return length of the string.
Another method to convert string to list of characters. -
Create a class PairsPossible which should inherit StringClass.
It should have a method to store the list of all possible pairs formed.
Another method to print the stored pairs seperated by space. -
Create a class SearchCommonElements which should take string as an input from constructor.
Create a method to find common elements from strings taken from StringClass and PairsPossible classes.
Return the answer in a list. -
Create a class EqualSumPairs to generate the count of total paris formed by PairsPossible class.
Print the output for SearchCommonElements and EqualSumPairs classes.