Seven people are to occupy consecutive seats in a theatre. In how many ways can this be done if (a) there are no restrictions? (b) two people A and B sit at opposite ends of the row of seven seats? (c) two people A and B sit together? (d) two people A and B do not sit together? .