Whole numbers are those numbers which we use to count such as 1, 2, 3, 4, 5, and so on plus zero.
The word whole reminds us of something that is unbroken, uncut, or complete.
If you say that you are going to eat the whole sandwich, this means that you will eat 1 sandwich all by yourself.
In other words, the sandwich was not cut and as a result you did not eat just a fraction or portion of the sandwich.
By the same token, if you say that you read the whole book yesterday, it means that you did not read a portion or fraction of the book.
As you can see the word whole excludes the idea of fractions or decimals.
Therefore, fractions and decimals are not whole numbers.