The process can have many results for the same output. Those results may include a message that should be displayed, an alert…