Capital punishment is one type of method which can avoid and monitor the perpetrate a crime. I am partly agreed with this statement, as other criminals can take a response of own actions, but there have such kinds of program which can help for offenders with acts.
On the one hand, prisoners which failed rehabilitate, they released after some years and they continue with misdeeds, attacking from people, or reoffending. And they re-arrested and returned to court and judge called for the unexpectedly capital punishment as they cannot pay fine or educational programs already cannot support for them. As a result, for others lawbreakers it might be chance of reform or take the impulse control, and they want avoid the harsh punishment and they begin live good as other people. For instance, there have in USA which have some state-sanctioned killing in law which criminal records less than other countries.
On the other hand, in the prison, perpetrators with heinous crimes, try to change conduct and return to good life with correctional facilities, rehabilitation much more help them than they expect, and upon release, they able to take the opportunities for education and work, they also come back to community which they already forget about the past and restorative life without such kind of execution. For example, in my country a lot of early released inmates which learned good rehabilitation, and now they live with better possibilities than in past.
From my point of view, offenders with strict crimes should take the accountability for their actions, as can lead to execution which after they would regret about own operations.
Overall, the death penalty can be effective and others would take responsibility, while mature people will avoid the harsh cases.
