Code is copied!
Define Class Replace with the following details
Class Name Replace
Data members
String str, substr
Member Functions
Replace() Constructor.
Replace(String s) - A constructor to assign s to str
void display() - To print values of st, substr and frequency of substr in str
voidgetword(String ss) - to assign ss (it is a string no blank space) to substr
intfind_frequency() - to find frequency of substr in str and returns the frequency substr can occur in sub word also.
For Eg.
Str = "fox jumped on the ox
Substr ="ox"
It should return = 2
Also write main().



