Projects

Submitted by: Submitted by

Views: 10

Words: 400

Pages: 2

Category: Science and Technology

Date Submitted: 12/06/2015 01:07 AM

Report This Essay

Seven Steps to Programming

1. Understand the problem.

a. Clear description of the problem in English.

b. Understand the inputs:

1. What drive, or console?

2. Name of the file.

3. Fields in the record.

4. How are the fields defined?

c. Understand the outputs:

1. Where do I put the outputs? - printer, tape, disk, console.

2. What data goes there, and in what order, and format.

d. Formulas given – you are not experts in math, statistics, physics, finance, etc.

2. Develop alternatives on how to solve the problem, and pick the best.

3. Put your logic on paper. This includes structured charts, flowcharts, pseudocode, etc.

4. Pick a language and code the program. This is a snap if you have the logic on paper.

5. Compile the program, and fix any syntax (you have violated one of the rules of the

language).

6. Execute or run the program. Here you may have logic errors (adding 2 + 2 and getting

the answer 5).

7. Document the program. This is very important. It includes good comments, good

variable names, good indentation, etc.

What to do when you first get a project.

1. Read the project two times, thinking about the input, formulas, and output. Save

the current project as the next project. (p1.cpp to p2.cpp etc.)

2. Do the layout. Remember to represent numbers, use a “n”. To represent alphanumeric

data, use an “x”.

3. The Data Dictionary is next. Think about the type for each variable. If it’s 1

alphanumeric character, use char. If it’s more than 1 alphanumeric character,

think about the number of bytes you need to store the biggest field, and add 1.

Take out the old data dictionary and put in the new.

4. Hand calculations is next. Do them with excel.

STEPS 2, 3, and 4 may be DONE IN ANY ORDER

5. The cout’s are next. With the data dictionary and the layout, this should be easy.

Figure out where they go in the program. In the heading? report? or trailer?

6. Do the math next. Take out...