The morality of human acts depends on:
- the object chosen;
- the end in view or the intention;
- the circumstances of the action.
The object, the intention, and the circumstances make up the "sources," or constitutive elements, of the morality of human acts.
Source: Catechism of the Catholic Church (Vatican.va)