this user just copy and pasted some homework assignment, which is not appropriate for any SE site. However, we referred them to SO. People like to post in chat things like
Please get your question closed on Stack Overflow instead
and comments on that question included:
We won't do your homework for you on this site, and neither will Stack Overflow.
which asks the question: why do we refer them there?