We are going to use factorial
Now, we have seven different books to be placed on shelf
[tex]7!\text{ = 7}\times6\times5\times4\times3\times2\times1\text{ = }5040[/tex]Hence, David can place all the 7 books on top shelf of his bookshelf in 5040 different orders.