I don't even think that the code you posted will compile. You have an if/elseif/else block outside of a method.
Anyways, you have a card class, and a deck class.
Now you need to write a Main program that will use the Deck Class to deal out Hands of cards.
So I would think that you would need to either create another class (Hand) or use arrays (as suggested).
Hands would probably be the better way from an OOP point of view.
It really helps me to understand what to do if I write down what is done step by step.
For example, the program starts:
- The system shuffles the deck
- The system deals out 5 cards to 5 hands
- Each player decides what cards to discard
- The system starts with player 1 and asks for the cards they wish to return
- The player returns the cards
- The system gives them back the same amount of cards that they returned by selecting off the top of the deck
- Each hand is evaluated to determine which hand wins.
Each noun (I underlined some of them) is a class and each verb (I italicized some of them) is a task that the class has to do. These tasks are the methods that you have to implement...the steps that occur is the "main" application method.
This technique is very helpful and should aid you in figure out what to do.
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.