The practice of restructuring existing code to improve its internal design without changing its externally observable b…