Here are the types of figurative language used in each example:
a. Personification - "The stars danced in the night sky." (Stars are given the human-like ability to dance.)
b. Metaphor - "Her heart was a drum, pounding loudly." (Her heart is compared to a drum, suggesting strong emotions, without using "like" or "as.")
c. Simile - "He was as brave as a lion." (A comparison using "as" to show that he possesses bravery similar to that of a lion.)
d. Personification - "The trees whispered secrets to the wind." (Trees are given the human-like ability to whisper.)