Thank you

, Actually i already know how to write function and stuff.
However the thing is that every time for my assignment, i am having a hard time trying to break down the programming question. So i am kind of looking for a book that teach me step by step how to write a fully program and debug it.
Unfortunately I would suspect you are searching in the wrong direction. In my opinion, what makes a programmer good is not a matter of finding a book or a couple of them which teaches you how to code well.
There are several aspect of what makes a programmer good. Good in various aspect from able to model problems to exists solving techniques, able to apply the most appropriate technique to solving a problem, able to appreciate operational robustness and efficiencies instead of just theoretical efficiency, able to find the right tools for the right job, able to keep your effort in the right balance when tackling a piece of work within a sensible timeframe, knows how to measure your program correctness and efficiencies, knows how to program defensively, knows how to assess on the business requirements and make appropriate judgement in how to approach the problem and so solve.
As you can see, many aspect of what I have mentioned above are seldom found in books. If they do, they exists with the intention to introduce and explain, but not to explain with the intention to teach you code properly.
If I may say so, the technique which you are searching is in essence be a scientist and a detective. A detective job in a crime scene is to investigate on what went wrong, and very often you hypothesis and you deduce what could have went wrong and then you prove it using some reasonable and common sense. This job can be laborious at times and those good at it often make accurate guesses and when they test on those guesses, they most probably hit on the nail quite early. These comes with experiences and these experiences are often on the job, not in the book. There is also an aspect at which you need to be a scientist, and a scientist don't biased. Neither do they take things as-is. They often put themselves in a neutral stand and test out possibilities, even if they seems quite unlikely. There are a few times when I am debugging my work, I have to assume some very unlikely case and they did tested out to be the problem. However these cases are rare, most of the time they are rather superficial, just oversight. I do find a lot of times, amateurs developers don't learn to question their own judgement as-if what they assumed are correct or not, they just took some assumption with faith and move on debugging based on those assumptions without knowing if there are evidences or common sense to support those claims. Hence the further they dig, the more they are into the wrong direction. Diligent ones will find the root cause after a long dig in all directions, and silly ones will never find their way out.
Then there are also those too eager to start coding like they already figure out all things, but often find themselves needing to redo a lot or worse of all, not willing to redo and continue doing the wrong things, just making a simple architecture ends up messy and patchy. That is why good programmers think more than they code. With experience, one can mentally think about the problem and think about what is required and what are missing before starting work. We need smart programmers whom can grasp things mentally, not coding fast and heedlessly.
If you ask yourself what you need to program efficiently, robustly and productively. The answer is KNOWLEDGE. Knowledge in a lot of areas like understanding what data structures are available and how you use them. What API are available and do you know your SDK well ? What libraries are available and how you can fit them for your work ? How do you put things together so instead of reinventing the wheel, you are more like putting things together and orchestrate them properly.
The book you are searching for is the book in your mind, not printed elsewhere. If you are student starting out, then don't search for the silver bullet, it doesn't exist. What exists are knowledge scatter all over the place and you should learn how to gather them and put them to good use.