13.Factory Constructor

AFactory constructor is a constructor prefixed with the factory keyword that gives you control over how an object is created. Unlike a…