Classifying Rocks by How They Are Formed