Final answer:
John Adams avoided a full-scale war with France by pursuing limited hostilities and diplomacy after the XYZ Affair, leading to peace negotiations.
Step-by-step explanation:
As President, John Adams was able to keep the US from going to war with France following the XYZ Affair. After discovering the attempted bribe by French officials, Adams disclosed the situation to Congress, which roused public sentiment towards defending American honor, leading to the Quasi-War.
However, Adams refrained from declaring a full-scale war and instead pursued a path of limited hostilities and diplomatic resolutions. This eventually culminated in another diplomatic mission to France, leading to peace negotiations and avoiding an all-out conflict with France.