how is the classification done?
It is  formed  on the basis of the Universal Decimal Classification (UDC), which combines the basic Dewey numbers with selected punctuation marks (comma, colon, parentheses, etc.)
Dewey Decimal Classification
formed the basis of the Universal Decimal Classification (UDC), which combines the basic Dewey numbers with selected punctuation marks (comma, colon, parentheses, etc.)
where did the dewey decimal system come from The Dewey Decimal Classification (DDC), colloquially the Dewey Decimal System, is a proprietary library classification system first published in the United States by Melvil Dewey. when did he do so? 1876
wiki:1571647
Dewey Decimal Classification [SEP] Influence and criticism
Dewey Decimal Classification numbers formed the basis of the Universal Decimal Classification (UDC), which combines the basic Dewey numbers with selected punctuation marks (comma, colon, parentheses, etc.). Adaptations of the system for specific regions outside the English-speaking world include the Korean Decimal Classification, the New Classification Scheme for Chinese Libraries, and the Nippon Decimal Classification (Japanese). Despite its widespread usage, the classification has been criticized for its complexity and limited capability for amendment. In particular, the arrangement of subheadings has been described as archaic and biased towards an Anglo-American world view. In 2007–08, the Maricopa County Library District in Arizona abandoned the DDC in favor of the Book Industry Standards and Communications (BISAC) system commonly used by commercial bookstores, in an effort to make their libraries more accessible for patrons.