When designing a framework, the most important thing is whether the API is concise and easy to use for the caller, therefore, before we start entering the first piece of code, we need to consider what the APIs looks like, so that we can complete the framework with clear goals…