Single case mode
As for the single case pattern itself, I don't think I can say it here, it's the simplest one in the pattern. I just want to talk about my idea of this model.
In order to implement a singleton pattern, it is common practice to define a method in a class such as getinstance, to determine if the instance is null to create a new instance, or to return an existing instance. But I think this is a way of coupling the lifecycle management of objects with the class itself, against the SRP principle. So I think that where you need to use a single example, the responsibility for lifecycle management should be shifted to the object container, and our class is still a clean class.
For the next instructions, let's write a few of the interfaces and classes that are needed later: prep work
Iorder interface, Commonorder class, Viporder class: