Modified for OOPs approach
Modified for oops approach