1 / 18

What is programming?

What is programming?. Steps to solve a problem. Repeatable by executing or “doing” the steps again. Write a program. Problem solve phase Implement phase (Maintenance phase) Program VCR to tape American Idol. Problem Solving. Solve the problem before writing any program Pseudo Code

yvonne-lott
Télécharger la présentation

What is 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. What is programming? • Steps to solve a problem. • Repeatable by executing or “doing” the steps again. UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  2. Write a program • Problem solve phase • Implement phase (Maintenance phase) Program VCR to tape American Idol UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  3. Problem Solving • Solve the problem before writing any program • Pseudo Code If score is positive Add score to Total Else Display an error message UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  4. Algorithm • Instructions on how to do something • Details • If you leave out steps… Can you write an algorithm to set an alarm clock? UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  5. What is a programming language? • Set of instructions, rules, and symbols known by a computer that can be interpreted by the computer to solve a problem. UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  6. High Level Programming Languages C++ Java BASIC COBOL English Like Easy to Read and Write (Compared with low level) C++ Code Example Total = Total + Score; UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  7. Low Level Programming Languages Total = Total + Score; Machine Code 10010110 00000000 10100101 Assembly Code Add AX, Score UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  8. Programming Steps • Create source code file: Lab0.cpp • Compile to machine code: Lab0.obj • Link to executable program: Lab0.exe • Run Lab0.exe UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  9. What is a computer? Network CPU Output Input MEMORY Storage UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  10. Hardware • CPU • Memory • Keyboard • Monitor • Disk • … UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  11. Problem-SolvingTechniques • ASK for HELP!!!! • Look for things that are familiar • Given salary, compute a 10% salary increase. • Given the price of a product, compute a 10% price increase • Solve by analogy • I know how to rollerblade. • This is similar to ice skating. • Means/Ends Analysis • If I’m on one side of the river, how can I get to the other side? UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  12. Problem-Solving Techniques • Divide and conquer • Build a house with electrician, carpenter, plumber etc. • Building-block approach • Components of a sound system • Merging solutions • What things can be done at the same time? UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  13. Mental Blocks • Fear of starting • Just do it • Algorithmic problem solving • Not always easy • May fail (it will make you stronger) UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  14. How to Store Data in Computer Bit Electronic Device On / Off Value: 1 / 0 Byte 8 bits Possible combinations 256 28 UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  15. 1 0 1 1 0 0 1 1 How to Store Data in Computer Binary Number 27 26 25 24 23 22 21 20 • 27 + 23 + 22 + 21 + 20 • + 8 + 4 + 2 + 1 • Decimal Number: 143 UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  16. 0 0 0 0 1 0 0 1 How to Store Data in Computer Binary Number 65 Character ASCII (EBCDIC) ASCII Character is See Appendix D pp. 695-696 UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  17. How to Store Data in Computer Word 2 bytes (16 bits) Double Word 4 bytes (32 bits) Integers Binary Numbers Characters ASCII Unicode (p. 34 footnote) Float Numbers? Negative numbers? UWP - Landgraf Some slides are from Dr. Qi Yang's notes

  18. How to Store Data in Computer KB 1024 Bytes 210 MB 1024 * 1024 Bytes 220 GB 1024 * 1024 * 1024 Bytes 230 TB… UWP - Landgraf Some slides are from Dr. Qi Yang's notes

More Related