Explain the difference between online processing and batch processing and provide an example of each type.