110 likes | 353 Views
What is a Program?. Programs are sets of computer instructions, written in a programming language.Low Level - machine specific, machine language. High Level - portable, allows expression in a language closer to that used by people. A conversion is required between the levels, to translate between
E N D
1. Computer Programming Essential Principles of program design
2. What is a Program? Programs are sets of computer instructions, written in a programming language.
Low Level - machine specific, machine language.
High Level - portable, allows expression in a language closer to that used by people.
A conversion is required between the levels, to translate between a programming language and a machine language. This is the job of Compilers, Interpreters or Assemblers.
3. Programming Languages BASIC (Beginners All-purpose Symbolic Instruction Code)
Pascal
Fortran(Formula Translator)
COBOL (Common Business Oriented Language)
Logo
C++
Javascript
Visual Basic
and many, many others...
4. Computer Solutions Designing a computer solution is a creative process. There needs to be a balance between what computers do well, and what people do well.
Computer strengths - mass storage, fast and accurate retrieval, fast and accurate processing, following instructions.
People strengths - recognising patterns, formulating goals, identifying issues, resolving ambiguity, and dealing with special cases.
A computer solution is warranted when a task is too difficult, dangerous, tedious or time consuming for people.
5. The Design Cycle Defining the problemUnderstanding the problem, identifying key aspects and constraints.
Planning a solution.Classifying the problem, structuring data, specifying processing, exploring known solutions to similar problems, identifying resources, planning test cases.
Designing a solution.Exploiting known solutions, using packaged solutions, modifying existing solutions, developing new solutions (programming).
6. The Design Cycle Implementing the solution.Using the program with appropriate data, organising the output data.
Testing the solution.Checking the results with the definition of the problem, Does the solution actually solve the problem?
Reporting the solution.Producing a statement of the solution and the method of solution.
7. Documentation Documentation is developed in parallel with the development of the solution.
Includes problem statement, method of solution, test methods, results obtained, users manuals.
Use of REMarks through a program to help both the programmer and others understand the process.
8. Developing a Program Define the problem clearly.
Decide on an appropriate structure for the data.
Develop a sequence of actions or processes.
Refine processes - modular, structured programming.
Develop algorithms.
Code the program in an appropriate computer language.
Test and de-bug the program.
Prepare documentation.
Publish solution.
9. Errors/Bugs Software errors are called bugs. There are 2 types of errors
Syntax Errors- problem with program- your command differs from that of the programme’s.
Runtime Errors - works correctly and the syntax is correct, but it does the wrong thing(Patches fix errors in later versions)
10. There are 3 things involved in computer programming
Sequence
Selection (If…Then…Else)
Repetition (Do While)