6.8 Summary


6.8 Summary

Data descriptions involve identifying, assigning a name, and assigning a type to every data item used in the problem solution. Data items are variables and constants. The names for the data items must be unique, because they reference a particular data item. The general data types are numeric and string. The numeric types can be integer or real.

An algorithm is a precise, detailed, and complete description of a solution to a problem. The basic design notations to describe algorithms are flowcharts and pseudo-code. Flowcharts are a visual representation of the execution flow of the various instructions in the algorithm. Pseudo-code is more convenient to describe small to large algorithms; it is closer to writing an actual program.

The building blocks for designing and writing an algorithm are called design structures. These are sequence, selection, repetition, and input-output. Several pseudo-code statements are introduced in this chapter, the assignment statements, arithmetic statements, and input/output statements.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net