This blog lists down top code smells and code refactoring patterns which would help you write good quality code. Top…