What are the differences between cash and accrual basis accounting? Provide an example of each.

What are the differences between cash and accrual basis accounting? Provide an example of each.