yulisung: i have posted my code above...
But the code is incomplete, so cannot compile. So we can't test it.