Module 3

Cards (186)

  • Problem-solving
    The process of finding solutions to a problem
  • Computer programmers
    • They must first understand how a human solves a problem, then understand how to translate this "algorithm" into something a computer can do, and finally how to "write" the specific syntax (required by a computer) to get the job done
    • It is sometimes the case that a machine will solve a problem in a completely different way than a human
  • Steps to solve a problem on a computer
    1. Know how to represent the information (data) describing the problem
    2. Determine the steps to transform the information from one representation into another
  • Information representation
    A computer can only really know about numbers, characters, booleans, and lists (called arrays) of these items. Everything else must be "approximated" by combinations of these data types
  • Variables
    Used to "encode" all the "facts" necessary to represent a problem. There are "good ways" and "bad ways" to encode information. Good ways allow the computer to easily "compute" new information
  • Algorithm
    A set of specific steps to solve a problem
  • Steps to find the average of two numbers
    1. Add the two numbers and save this result in a variable
    2. Divide this new number the number two, and save this result in a variable
    3. Provide this number to the rest of the program (or print it for the user)
  • Encapsulation
    The idea of storing the information necessary to a particular idea in a set of variables associated with a single "object", and creating functions to manipulate this object, regardless of what the actual data is
  • Abstraction
    The idea of "ignoring the details"
  • Complexity hiding
    The idea that most of the times details don't matter. By "encapsulating" what is meant by an operation and "reusing" this operation over and over again, we make programming tractable
  • Problem Solving Process
    1. Define the problem
    2. Analyze the problem (using tools, such as questionnaires, interviews, observation, reviewing documents)
    3. Identify and evaluate possible solutions
    4. Select and justify the optimal solution
    5. Implement
    6. Review
  • Problem solving is a step-by-step process that always proceeds in a linear and logical manner
  • Understanding the problem
    If you are to create a successful solution to a problem, you need to understand the problem
  • Programming languages come in many forms or 'paradigms'
  • Main classes of programming languages
    • Low level languages
    • Object-orientated languages
    • Declarative languages
    • Procedural
    • Functional languages
  • Stages in the problem solving process
    1. Define the Problem
    2. Problem analysis/Investigate
    3. Identify Possible Solutions
    4. Select the best solution
    5. Implement
    6. Evaluate & Review
  • Low level languages

    • Geared towards a particular CPU family
    • Almost (but not quite) machine code
    • Assembly language is an example
  • Problem Definition
    Your problem definition transforms your topic into a scientific problem that you will investigate and analyze. The purpose of writing a definition is to establish accuracy and clarity in the scope of a project.
  • Assembly language
    • CPU specific
    • Use mnemonics as programming code
    • Use labels as reference points
  • Statement of Purpose and Goals
    • A well defined topic that is limited enough in scope, involves a scientific application, lends itself to visualization of results, and makes good use of computing resources
    • A specific direction that establishes an investigative tone and determines stages of development
  • Algorithm
    A problem-solving formula that provides step-by-step instructions used to achieve a desired outcome
  • Procedural languages
    Code specific instructions for the computer to carry out
  • Define the Problem
    1. Make a list of resources that have some connection to and information about the problem
    2. Clarify any unfamiliar terms or concepts
    3. Clarify what you understand the problem to be
    4. Write a brief, factual statement of the existing problem or issue
    5. Set specific goals
    6. Check that these are understood and agreed by all involved
    7. Check that the problem is worth solving
  • Algorithm
    A systematic method for producing a specified result
  • Algorithm
    • It must be followed exactly to produce a correct result
  • Imperative languages
    Give orders or instructions to the computer
  • Algorithm
    Step-by-step problem-solving formula
  • Algorithm
    • Input specified
    • Output specified
    • Definiteness
    • Effectiveness
    • Finiteness
  • 3rd generation languages
    Make it easier for people to read and understand the code
  • Don't include implied solutions in the problem statement
  • Syllabus Focus: Unit 1 Module 3 Content 8
  • Input
    The data to be transformed during the computation to produce the output
  • Algorithm
    • Instruction manual for installing new software on your computer
  • Specific Objective 8: identify the necessary properties of 'well designed' algorithms
  • Example problem statements
    • Customers in a restaurant are complaining that the food is cold when it is delivered to their table. Goal: Food to be hot when delivered to table.
    • Student numbers on the math degree are falling. Goal: Restore numbers to previous levels
  • Procedural languages
    • C
    • Pascal
    • FORTRAN
    • COBOL
  • Properties of well-designed algorithms
    • General solution to the problem in a finite number of steps
    • Clearly defined and unambiguous
    • Flow of control from one process to another
  • Heuristic
    A general problem-solving framework, a mental shortcut used to solve problems
  • Output
    The data resulting from the computation (the intended result)
  • Problem Analysis/Investigate
    • Keep asking "Why?"
    • Need to do a lot of investigating
    • Use a systematic approach like 'The 5 Whys' or 'Root Cause Analysis'
    • Use a diagram to structure information like a Cause & Effect chart, Fishbone diagram, or Flowchart