Creating a tip calculator in Swift