When is the home work due?
I think the OP is asking what to do with the Set and Clr input pins, and possibly the unused Q and Qbar putput pins?
If all you do is hook Q to Din (and Qbar of the last flip-flop to D of the first flip-flop ) you will fail the homework assignment. (At least if I was grading it). You need to consider that the flip-flops can come up in random states, and some of those states will create a hazard where the cycle is shorter than the eight states you think you are going to get.