Please choose the correct answer to the question: Rocks found on Earth are classified as sedimentary, metamorphic, or igneous based on

Answer1: where the rocks were found. Answer2: how the rocks were formed. Answer3: the composition of the rocks. Answer4: the color and shape of the rocks.

Answer format: answer1/answer2/answer3/answer4
Answer: answer2