Select whether the sentence below is a simple, compound, complex or compound-complex sentence.

David's nephew, Joab, was able to unlock the city gates at night when he swam through the tunnel.
a.
Simple
c.
Compound-Complex
b.
Compound
d.
Complex


Please select the best answer from the choices provided

A
B
C
D