A computer cannot think.
To get it to do any useful work, a computer must be provided with a program.
A program is a list of instructions.
Programming a computer is a lot more involved than simply writing a list of instructions.
Problem solving is a crucial component of programming.
Before we can write a program to solve a particular problem, we must consider carefully all aspects of the problem and then develop and organize its solution.
Initially, you will probably spend a lot of time in the laboratory entering your programs.
Later you will spend more time removing the errors that inevitably will be present in your programs.
Resist the tempation to start entering your program as soon as you have some idea how to write it.
Instead, think carefully about the problem and its solution before you write any program instructions.
Once you have written the program out, desk check your solution by carefully performing each instruction as the computer would.
To desk check a program, simulate the result of each program instruction using sample data that are easy to manipulate.
Compare these results with the expected results, and make any necessary corrections to your program.
A software engineer is someone involved in the design and implementation of reliable software systems. Software engineers and software developers use the software development method for solving programming problems.
State the problem and get a clear understanding of what is required for its solution. Although this step sounds easy, its can be the most critical part of problem solving.
You must study the problem carefully, eliminating aspects that are unimportant and zeroing in on the root problem. This process is called abstraction.
If the problem is not totally defined, you should request more information from the person posing the problem.
Identify the program's inputs, desired outputs, and any additional requirements or constraints on the solution.
Identify what information is to be supplied as the problem's data and what results should be computed and displayed.
Determine the required form and units in which the results should be displayed (for example, as a table with specific column headings).
Develop a list of steps called an algorithm to solve the problem, and verify that the algorithm solves the problem as intended.
Writing the algorithm is often the most difficult part of the problem-solving process.
Once you have an algorithm, you should verify that it is correct before proceeding further.
Implement the algorithm as a program.
A knowledge of a particular programming language is required because each algorithm step must be converted into a statement in that programming language.
Test the completed program and verify that is works as expected.
Don't rely on just one test case; run the program using several sets of data.
Back to the COMP 435 page