Suppose i have a class ObjectUtills
and all the methods which are as part of the class has some common things to do before start and after the end of the core functionality of the function like:
func1() {
some common things
core functionality
some common things
}
So my question is how would you achieve this by OOPS concept. Suppose tomorrow somebody is going to add a new function then he should just add the core functionality not the some common things
and the client who calls this function automatically get those common functionality. Thanks.
Please don't give answers like put in a function like preProcess
postProcess
and call those inside all the functions. But thats the same thing.