5
previous
|
toc
|
next
Programming
Program = Data Structures + Algorithm
Data Structures
constructs used to represent data types that are appropriate for a particular problem e.g. int, array, link list
Algorithm
is a sequence of logical steps required to perform a task e.g. sorting Here is
an algorithm to solve the problem of changing a flat tire
. Or the
algorithm
to solve
SliderPuzzle Game
Analysis and Design
Making the right decision
Decision Table and Flow Chart
Structure thought process
systematic; step-wise refinement; divide and conquer; and (pseudo code)
Unified Modeling Language OOD diagrams:
Class
Object
Component
Deployment
Satechart
Activity
Collaboration
Sequence
Use Case
Programming Language/Compiler is only a tool
Language translation
the compilation process
source code -> compiler -> assembly code -> assembler -> machine code
have syntax (form) and semantics (meaning)
Natural language
add 5 to the variable cnt
Java/C/C++ language
cnt = cnt + 5;
Assembly language
LDA CNT;ADDA#5;STA CNT
Machine language
B62000;8B05;B72000
Command Mode Environment
J2SDK under
MS Windows
and
Unix
Integrated Development Environments (IDEs)
MS Visual J++, Symantec's Visual Cafe, Borland's JBuilder, IBM's Visual Age, and
Eclipse
The Programming Process
Defining the problem (exact requirements of the task i.e. input, process, output, error handling).
Outlining the solution (stepwise refinement).
Selecting/representing algorithm (pseudocode or flowchart).
Coding (transforming an algorithm into a program).
Debugging ( syntax and logic/semantic error).
Testing and validation (program correctness).
Documentation ( a continuous process).
Maintenance (change and enhancement of program).
5
previous
|
toc
|
next