Answer:
Following is attached the solution of each part step-by-step. I hope it will help you!
Explanation:
perdonnosee
See attached file for complete detailed code.
See attached file.