Before becoming president, James Madison served as which of the following?

A.
Secretary of State

B.
Secretary of War

C.
Secretary of the Treasury

D.
Secretary of the Interior