A person subject to this code shall be punished as a court-martial directs if:
(1) He or she wrongfully engages in extramarital conduct with another person;
(2) At the time the extramarital conduct occurs he or she is married to someone else or knows that the other person is married to someone else; and
(3) Under the circumstances, his or her conduct is to the prejudice of good order and discipline required by a member of the United States Armed Forces or is of a nature that brings discredit upon the United States Armed Forces.