So, what have you got so far? Where does your output differ from your expected results?
The assignment seems to do a pretty good job of leading you in the direction of the functions it's expecting you to decompose it down in to. You should probably follow its lead.