1 / 19

Introduction to Programming Concepts & Logic

Introduction to Programming Concepts & Logic. COP1006 with Dr. Meg McManus. Introduction. Course Outline Asthma & Allergies Course Website Tests Assignments. Puzzles, anyone?. Do you Suduku ?. Why Programming?. We encounter problems every day.

Download Presentation

Introduction to Programming Concepts & Logic

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. Introduction to Programming Concepts & Logic COP1006 with Dr. Meg McManus COP1006

  2. Introduction • Course Outline • Asthma & Allergies • Course Website • Tests • Assignments COP1006

  3. Puzzles, anyone? Do you Suduku? COP1006

  4. Why Programming? • We encounter problems every day. • Programs are simply solutions to problems. • Puzzles are simply a solution to a problem • To create programs • We have to learn to think a different way… • The way computers think. COP1006

  5. General Problem-Solving Concepts Lesson 1 COP1006

  6. 6 Steps in Problem Soliving COP1006

  7. 6 Steps in Problem Solving 1. Identify the problem • If you don’t know what the problem is, you can’t create a solution for it. • Ex. Calculate Payroll for 10 Employees • Ex. Provide directions COP1006

  8. 6 Steps in Problem Solving 2. Understand the problem • Clients rarely completely understand what they want let alone how to tell you. • Perform • Research - to form your own knowledge base • Observations by • Watching current activity • Reviewing past activities • Ex. Giving instructions to someone on how to find an address. COP1006

  9. 6 Steps in Problem Solving 3. Identify alternative ways to solve the problem. • Rarely does a problem have only one solution. • Look at • Efficiency • Speed • Accuracy • Acceptability Don’t just find one solution and stop there. Rarely is it the best solution…especially for novice programmers… COP1006

  10. 6 Steps in Problem Solving 4. Select the best way to solve the problem from the list of alternative solutions. • Establish criteria to help when performing evaluations on each alternative • Include pros and cons for each solution • Select the best solution based on the research COP1006

  11. 6 Steps in Problem Solving 5. List instructions that enable you to solve the problem using the selected solution. • Create a numbered, step-by-step set of instructions • Instructions must be included in the knowledge base • So, what’s a knowledge base? COP1006

  12. 6 Steps in Problem Solving 6. Evaluate the solution. • Test the solution • Are the results accurate? • Does the solution solve the original problem? • Does it satisfy the needs of the client? • Is it acceptable to the client? COP1006

  13. 2 Types of Problems • Algorithmic Solutions • Steps involved in following a set of instructions. • Ex. Calculating your checkbook balance • The solution will be the same each time the algorithm is followed. • Most computers use algorithmic types of problems. COP1006

  14. 2 Types of Problems • Heuristic Solutions • Solutions that can’t be reached by following a direct set of steps. • Created by using reasoning built upon knowledge and experience…and by trial and error. • Ex. Determining which stock is the best value at any given time • The results may not produce the same results each time the algorithm is executed. • Artificial intelligence deals with heuristic types of problems. COP1006

  15. Solutions • The instructions that will result in the best solution. • Again, the result may • Be more Efficient • Be Faster • Be more Understandable • Be more Maintainable • Be Reusable COP1006

  16. Results • The outcome of the program • Or the completed computer-assisted answer… • May take any form: • Printout • Updated files • Output to monitor, speakers, etc. COP1006

  17. The Program • The set of instructions that make up the solution after they have been coded into a particular computer language. Although we won’t be actually writing programs, at least not in any specific language, this is what we will be working toward throughout this course! COP1006

  18. Difficulties in Problem Solving? • Humans must • Change the way we think • Work through the problem completely • Follow a logical sequence of steps • Not make hasty decisions • Not make haphazard evaluations of potential solutions COP1006

  19. Next? Lesson 2! COP1006

More Related