it is a metaphor because a simile must have 'as' or 'like' in it whereas a metaphor is something that's not literal and is normally when something stands for another thing
an eopty classroom is being alone in a haunted house
The empty classroom was like a ghost town, devoid of any life or sound.
An empty school is like a ghost town, with echoing hallways and silent classrooms.
Turn the lights off when the classroom is empty.
Das klassenzimmer ist leer
Students?
That's a simile. A comparison of something to something else using the word "like" or "as".
"More fierce and more inexorable far than empty tigers or the roaring sea."
A simile.
The door flung open, like something wild had escaped from it . Like it was empty, two-story tomb of some runaway zombie.
A metaphor