A computer science professor has 7 different programming books on a bookshelf. 3 of the books deal with c++, the other 4 with Java. In how many ways can the professor arrange these books on the shelf if all the c++ books must be next to each other?

Is there a formula for this?