Which is a reason that Mexico and the U.S went to war?

A. The election of James k. Polk
B. The U.S congress annexing (adding) Texas
C. The U.S invasion of California
D. The assassination of the president