Directions: Read the lecture and the assigned readings before…