Branden Bobo wrote:my psudocode is below (3 stages of refinement) I want to know if I grasped the point of psudocode and stepwise refinement any advice/constructive criticism is much appreciated.
Well, I'm afraid I'm not familiar with the book; but I thought that the point of pseudocode was
not to include implementation.
ie, You don't describe
how something is going to be done, you describe
what is going to be done - at least that's the way I was taught - so my pseudocode would never include references to things like Scanner's. To me,
you should be able to translate pseudocode into
any (or almost any) language.
Example - Suppose I had a piece of high-level pesudocode with the line:
Load grid data from file.
I might 'refine' that by breaking down the action, eg:
but that's just the way I do it, and your book may have a completely different notion of 'refinement'.
BTW, one of the businesses of pseudocode is to allow you to refine the
logic without resorting to actual code; and, as Campbell already pointed out, yours still contains a fair bit of redundancy:
1. You don't have to check all directions.
2. You don't have to check all 400 cells.
HIH
Winston