Rule two: design your software before you start to code!

Rule three: don't try to code the whole program at once. Use step wise refinement to break the progam into manageable functions/class...