Which officer represents the county as a criminal prosecutor in court and as the main legal advisor for the county government?
A.
county sheriff
B.
county treasurer
C.
district clerk
D.
district attorney