Don't think this is the right forum to post this question.
I also don't think we are supposed to do your homework or tasks. Maybe you can post the code you already have and tell us what the problem is with your code, so we'll be able to solve your problem (instead of asking just to provide the code and do the job you should do). I even doubt if you tried it yourself.
I just noticed you also posted it on the Java Intermediate forum, cross-posting is And you got there the same comment as I just made.
Don't think this is the right forum to post this question.
I also don't think we are supposed to do your homework or tasks. Maybe you can post the code you already have and tell us what the problem is with your code, so we'll be able to solve your problem (instead of asking just to provide the code and do the job you should do). I even doubt if you tried it yourself.
I just noticed you also posted it on the Java Intermediate forum, cross-posting is And you got there the same comment as I just made.
Kind regards,
Roel
ya thanks for your reply......i tried it but i couldn't find the correct method or way...........
could you please guide me with the concept to be used in for the above.......
i asked for a sample code because i understand better when i see the coding.....
thanks in advance........
Andrew Monkhouse
author and jackaroo
Marshal Commander
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.