Barack Obama has launched a sharp assault on Republican presidential rival John McCain and vowed to reverse America's economic failures.