If apple are still supporting your machine then they will replace the battery for around $200. If your machine is on the obsolete list then they will not work on it and you'll have to find a third party or do it yourself.
Apple guarantee there battery for 80% capacity for 1000 cycles or until the end of your warranty whichever comes first. They will not give you a new computer for a consumable part on a 5 year old computer simple as that. No one can answer your question it has never happened.