I know I need to use isEmpty() and size() for a list, but I do not know how to use them
You should explain what you are trying to do, instead of just saying what you think you are going to do. Also, some attempted code usually goes a long way toward resolving issues quickly.