|
|
|
This How To page is not language specific, it is about the logical steps that a program will use to complete any given set of
instructions. First off I need to state that regardless of the program invoIved, all programs have one common thread and that is the programmer
is trying to solve a problem. This problem is no different than any other problem that is encountered every day, by everyone. These problems can
range from making dinner, getting to work, balancing your checkbook, or creating a web page. The diffence between a human performing these steps
or a computer is that a human can perform many steps without thinking about them. For instance if we have to get out of bed in the morning,
we know how to do this and most of us do this without thinking, but a computer cannot perform these steps without being told each step of the
way. For an example a computer has to be told:
- open eyes
- grab blanket with right or left hand
- take blankets off
- swing legs off of bed
- stand up
|
Of course there are many other steps that I did not mention, but I am sure that you understand what I am talking about. I have found that the hard part of the program creation is not the actually coding, that is just syntax, but how will the computer complete the given instructions. Once a person has the steps they want the computer to take to solve the problem, the rest is fairly easy. There are numerous ways that a person can map out what they want the program to do. A few of them would be:
- Flow Charting
- Warneir_Orr Diagrams
- Pseudocode
|
|
| |
|
There are also different ways of mapping logic depending upon how a programmer is going to solve the problem. This will depend
upon if the programmer will use Object Oriented programming (C++, Java), or Structured programming (C, Visual Basic). I do not believe that Visual
Basic is an OOP language, just a wanna be. But these discussions are beyond the scope of this page, but there are numerous books available for each.
|
| |
|
Before I start I need to thank one of my ex-professors, Rick Barker, at Washburn University of Topeka, Kansas. He is by far the best
teacher that I have had. He is the kind of teacher that makes you think and just doesn't give you the answers. I know that he has made me a much
better programmer and I will be eternally grateful. He has graciously allowed my to use some of his exercises for these web pages. So without
much further ado, lets get on with it.
|
| |
3 Phases of problem solving
- Problem Analysis
- Algorithm Design
- Computer Implementation
|
| |
Flow Charting
- Explanation
- Sequence
- Conditionals
- Pre-Test Loop
- Post-test Loop
- Control breaks
|
| |
Warnier-Orr Diagrams
- Explanation
- Sequence
- Conditionals
- Pre-Test Loop
- Post-test Loop
- Control breaks
|