A Singleton is a design pattern that restricts the instantiation of a class to one single instance, providing a…