Who was president of the United States at the time of the Mexican-American War?

A) John Adams

B) James Madison

C) James Monroe

D) James Polk