For our actions to be good our intention must be good. It is good to help the poor, but if I donate to the poor out of vanity or from revenge, then it is not a good act even though, incidentally, the poor are helped. On the other hand, we must avoid the common contemporary error of thinking that the whole morality of any action is determined by the intention. The most noble intention cannot make an intrinsically evil action a good action. Thus, the bombings and killings perpetrated by terrorists in order to change some form of government are still murder. Stealing from the rich in order to help the poor a la Robin Hood is still stealing. The idea that "the end justifies the means" is very common today. Good by ill-advised people who are concerned about over-population or the proper raising of children resort to abortion in order to cut down on the number of births and to avoid unwanted children. But a good intention, no matter what it is, does not make something essentially evil, such as abortion, into something morally good.
The factors in human conduct that determine whether it is good or bad. There are three such determinants of morality, namely the object, the end, and the circumstances.
By object is meant what the free will chooses to do--in thought, word, or deed-or chooses not to do. Be end is meant the purpose for which the act is willed, which may be the act itself (as one of loving God) or some other purpose for which a person acts (as reading to learn). In either case, the end is the motive or the reason why an action is performed. By circumstances are meant all the elements that surround a human action and affect its morality without belonging to its essence. A convenient listing of these circumstances is to ask: who? Where? How? How much? By what means? How often?
Some circumstances so affect the morality of an action as to change its species, as stealing a consecrated object becomes sacrilege and lying under oath is perjury. Other circumstances change the degree of goodness or badness of an act. In bad acts they are called aggravating circumstances, as the amount of money a person steals.
To be morally good, a human act must agree with the norm of morality on all three counts: in its nature, its motive, and its circumstances. Departure from any of these makes the action morally wrong.
Traditional morality said there were three moral agents; the act, the motive and the circumstances. Theories such as legalism, utilitarianism and the Categorical Imperative argue in favor of only one of the three, and as such, it treats morality has being one-sided. All three determinants have a role to play.