1 / 37

Programming

Programming. Topic. Design tools Flowchart Pseudocode Programming language Language level Popular programming languages Language translator Assembler Complier Interpreter Demo VB C#. Program.

ashton
Download Presentation

Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming

  2. Topic • Design tools • Flowchart • Pseudocode • Programming language • Language level • Popular programming languages • Language translator • Assembler • Complier • Interpreter • Demo • VB • C#

  3. Program • A program is a list of instructions that the computer must follow to process data into information. • The instructions consist of statements used in a programming language, such as BASIC.

  4. Programming • Programming is a process for creating a list of instructions.

  5. Terms • Algorithm • Flowchart • Pseudocode • Coding

  6. Algorithm • An algorithm is a formula or set of steps for solving a particular problem. • EX: a recipe for baking bread is an algorithm.

  7. Algorithm

  8. Design Tools Flowchart Pseudocode

  9. Flowchart • Flowchart is a chart that graphically presents the detailed series of steps (algorithm, or logical flow) needed to solve a programming problem. • The flow chart uses standard symbols, called ANSI symbols, after the American National Standards Institute, which developed them.

  10. This example represents a flowchart

  11. Pseudocode • It is a method of designing program using normal human-language statements to describe the logic and the processing flow. • It is like an outline or summary form of the program you will write.

  12. Example of Pseudocode START DO WHILE (SO LONG AS) THERE ARE RECORDS Read a customer billing account record IF today’s date is greater than 30 days from date of last customer payment Calculate total amount due Calculate 5% interest on amount due Add interest to total amount due to calculate Grand total Print on invoice overdue amount ELSE Calculate total amount due ENDIF Print out invoice END DO END

  13. End: Design Tools

  14. Coding • Writing the program is called coding. Coding is what many people think of when they think of programming, although it is only one of the five steps. • Coding consists of translating the logic requirements from pseudocode or flowcharts into a programming language—the letters, numbers, and symbols that make up the program.

  15. To coding • Select the Appropriate Programming Language - A programming language is a set of rules that tells the computer what operations to do. Examples of well-known programming languages are C, C++, and Java. • Follow the Syntax - For a program to work, you have to follow the syntax, the rules of the programming language. Programming languages have their own grammar just as human languages do.

  16. Programming Language

  17. Five Generations • language • language • language • level language • language • Programming language are said to be • when they are closer to the language that the computer itself uses (1,0) • when they are closer to the language people use – more like English, for example.

  18. Characteristic of Different Generations

  19. Example Code of 3 Generations

  20. Brief history of programming language

  21. Language Translator • It is a type of system software that translates a program written in higher level programming language into machine language.

  22. 3 Types of Language Translators • Assembler • Compiler • Interpreter

  23. It is a program that translates the assembly language program into machine language.

  24. It is a language-translator program that converts the entire program of a high-level language into machine language

  25. The programming instructions are called the . • The compiler translates it into machine language, which in this case is called the . • The important point here is that the object code can be saved and thus can be executed later (as many times as desired), rather than run right away.

  26. Execute Immediately - An interpreter is a language-translator program that converts each procedural language statement into machine language and executes it IMMEDIATELY, . No is saved, as with the compiler.

  27. Visual Programming • Using a mouse, the programmer drags and drops objects on screen • The objects are arranged to make up the graphical user interface for the program being written • By double-clicking on those objects, the programmer can get into a coding window and write the programs to control the actions and behaviors of those objects • This makes it fast and easy to build prototype user interfaces and get end-user approval before doing a lot of programming

  28. Demo programming Console C# Console VB GUI VB

  29. Find capacity of a box • Problem • Find capacity of a box • Formula • Width * Length * Height

  30. Flowchart

  31. Debugging

  32. Program Bug • A program bug is an error that causes a program to malfunction. • Debugging is the process of ensuring that a program is free of errors, or bugs.

  33. Why calls program error as a bug?

  34. Types of Error • Syntax error • A syntax error occurs when the programmer has not followed the proper syntax (rules) of the programming language being used. • Logic error • Logic errors, or execution-time errors, stem from a logic problem in the program’s design and are often difficult to detect. • Such an error results when the command syntax is correct but the program produces incorrect results. This may happen if you have written a formula incorrectly

  35. Demo Error

More Related