SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction to Problem Solving Lecture

kiril avatar
22 diapositives · 467 Views · Jul 21, 2012

Introduction to Problem Solving Lecture. CSC 135 Brenda Wilson. Problem Solving. Algorithm - set of instructions for accomplishing a task unambiguous effective finite (except for continuous processing) Computer Program - algorithm suitable for execution on a computer.

Introduction to Problem Solving Lecture - slide 1
01 / 22Introduction to Problem Solving Lecture
1 / 17

Télécharger la présentation

Introduction to Problem Solving Lecture
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Introduction to Problem SolvingLecture CSC 135 Brenda Wilson

  2. Problem Solving • Algorithm - set of instructions for accomplishing a task • unambiguous • effective • finite (except for continuous processing) • Computer Program - algorithm suitable for execution on a computer

  3. ANSI says you are a device that can perform substantial ... . What am I? Definition A machine that can accept data, process the data, at high speeds , and give the results in an acceptable form with option of saving data & results.

  4. Does not compute!! Figure the deductions Then tell me... What we have here is a failure to communicate...

  5. What does a computer understand??? 110001001110 Machine Language

  6. Compiler/ Interpreter Assembler Needs Translation!! • High-Level Languages • Pascal, C++,Ada • VisualBasic, Cobol, Fortran,etc. • Assembly Language • Machine Language

  7. Interpreter Vs. Compiler • Interpreter • translates & executes one line at a time • Compiler • translates entire program & then executes

  8. Executing a Compiled Program High Level Language Compile Object Module Build Load Module Execute

  9. Terms used to describe High Level Languages • Structured – vs. spaghetti code • Procedural – programmer driven • Event-Driven • Object-Oriented – class,attributes, etc. R.A.D.

  10. Beginning: Do You Understand? • How problem is presented: • Required Results • Given Info • Process • How Program is written: • Given Info • Perform Processing • Req.Results • Input-Process-Output

  11. Tools Used for Algorithm Development • I/O Chart -- to analyze input & output • I O Gross Pay Deductions Net Pay Names Hrly Rates Hours Wrkd

  12. Tools Used for Algorithm Development Structure Chart - to show major tasks & subtasks

  13. Module In Out Tools Used for Algorithm Development • Top Down Design: Use pseudocode or flowchart (to show how each module works) • Module Interface Table : to show how each module shares data with other modules in the program

  14. Planning an OOED application – TOE chart

  15. Sender (Programmer) good overall picture good generalizing terrible at details slow!!! Receiver (Computer) good at details fast!!! terrible at overall picture terrible at new situations & inference Programming Language : set of notations & rules for combining notations to communicate algorithms

  16. Programming Languages • Syntax - set of formal rules determining valid constructions • Semantics - rules determining precise meaning of valid constructions in the language • “Bug”

  17. Proper Grammar Whoops!! Should be a quotation not apostrophe! (Ada) Put (“Enter your name’); lblArea.caption = txtLngth.text*txtWidth.txt Whoops!! Misspelled ‘text’! (VBasic) SYNTAX...

  18. What is meant?? The chicken is ready to eat. SEMANTICS...

  19. Computer Operations • Perform arithmetic • Compare 2 pieces of information & take alternative actions • Receive & give out information • Repeat any group of these operations • Save any information for later use

  20. 5 Operations of the Computer…examples in different languages

  21. Fundamental Control Structures In Programming

  22. Challenge: An English-speaking person from Guyana, S.A. has just come to visit at your house for a few days. This person has never used a cordless phone (maybe never even used a telephone at all!!). Write down instructions for this visitor to follow to make a phone call when he/she is alone in the house. Try to not assume any prior knowledge and try to think of every thing that could happen when the person tries to make a call. (example…is there a dial tone, if not—what to do!)