Hi dude man
Welcome to Javaranch. Please read
The JavaRanch Naming Policy and change your display name. You can change it
here. Thanks.
Regarding your question, we won't write the code for you and deprive you of a learning experience, but if you tell us what you've done, we can give you some hints on how to proceed.
Also, I'm moving this to the
Java in General(beginner) forum.