Originally Posted by
moglance
if you don't mind, will you please provide me the proper methods
Not really, but we would be happy to help you write your own.
Please use code tags when posting code. Check out the
Announcements page if you need help.
"i can't make it work, it displays a lot of errors" ...this tells us basically nothing.
What does the code do? What should it do instead? Provide actual output and desired output (with sample input if applicable)
If there are error messages, always include the full text of the error messages with the code and your question.
If you do not understand the error message, then say that is the question.