CCPROG1_process_and_importance

original file

The Process and Importance of Programming

Quote

Computer Programming is an art, because it applies accumulated knowledge to the world, because it requires skill and ingenuity, and especially because it produces objects of beauty -Donald Knuth

Some Terms

History of C and The Program Development Life Cycle

../_attachments/public_CCPROG1_history_of_c.png

../_attachments/public_CCPROG1_program_development_life_cycle.png

Problem Analysis

Setting up Algorithms to Solve Problems

An algorithm is a list or sequence of steps that will solve the given problem. They are in natural language, such as English or Filipino

Example:

  1. Ask the user to input the midterm exam score.
  2. Ask the user to input the final exam score.
  3. Ask the user to input 2 hands-on exam scores HO1 and HO2
  4. Ask the user to input the machine project score.
  5. Ask the user to input the course activities grade.
  6. Computer the grade using the formula $$ grade = Midterm \cdot 20% + Finals \cdot \frac{HO1+HO2}{2} \cdot 20% + MP \cdot 20% + CourseActivities $$
  7. Display/Output the grade.
  8. If the great is greater than or equal to 60.0, display "You passed!", otherwise, print "You failed!"

Flowcharts

Flowcharts are a graphical representation of a list or sequence of steps to solve the given problem.

../_attachments/public_CCPROG1_flowchart_symbols 1.png
../_attachments/public_CCPROG1_flowchart_example.png

Testing, Debugging, Errors

Types of Errors

Documentation

Written text that is embedded into a code or written separately, it explains the source code or how the software operates, and/or how to use it.

Types of Documentation

  1. User's Manual - a step-by-step instruction on how to use the program
  2. Internal Documentation - comments included in the program regarding how the program was designed and created
  3. Technical Manual - printed details on how the program was designed and created.

Why should you do documentation?