Test Paper

Submitted by: Submitted by

Views: 10

Words: 306

Pages: 2

Category: Literature

Date Submitted: 03/20/2016 08:05 PM

Report This Essay

Developing a C++ Program

This document provides a brief outline of the required steps to create a C++ program. The process is as follows.

1. Review Problem Statement

2. Create Algorithm

3. Map Algorithm to C++ Executable Statements

4. Add C++ Executable Statements to valid C++ Structure (i.e., keywords designating start and end of program, declarations, etc.)

5. Add appropriate commenting (i.e., include name, email address, problem description [i.e., purpose statement], algorithm)

6. Compile and Run Program

These 6 steps will be illustrated by walking through the process of developing a simple Fortran program. The requirements are as follows.

Problem Statement

“Develop a C++ program that requires two integer inputs from a user. The program will calculate the sum, product and average of the integers. The program will then display the results of each computation.”

Create Algorithm

In generic terms, an algorithm is a step-by-step process that leads to a solution. In most cases an algorithm is language independent. This implies that the same algorithm can be supplied to different programming language experts and comparable solutions can be developed (i.e., Fortran programmer, Pascal programmer, Java Programmer, Visual Basic Programmer, etc.)

|Algorithm | |

|Prompt User for Number1 | |

|Get Number1 | |

|Prompt User for Number2 | |

|Get Number2 | |

|Calculate Sum | |

|Sum = Number1 + Number2...