THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS.

Slides:



Advertisements
Similar presentations
PROBLEM SOLVING TECHNIQUES
Advertisements

Overview of Programming and Problem Solving ROBERT REAVES.
Chapter 1 - An Introduction to Computers and Problem Solving
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Week 9: Methods 1.  We have written lots of code so far  It has all been inside of the main() method  What about a big program?  The main() method.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Programming Fundamentals (750113) Ch1. Problem Solving
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
ECE122 L9: While loops March 1, 2007 ECE 122 Engineering Problem Solving with Java Lecture 9 While Loops.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Chapter 2: Developing a Program Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 1 Chapter 2 Developing.
Simple Program Design Third Edition A Step-by-Step Approach
Invitation to Computer Science, Java Version, Second Edition.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
Module 1- Getting Started Tell me what to do Using sets of instructions…
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
By the end of this session you should be able to...
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan Snd Term Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Introduction to programming in the Java programming language.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
CMP-MX21: Lecture 4 Selections Steve Hordley. Overview 1. The if-else selection in JAVA 2. More useful JAVA operators 4. Other selection constructs in.
Java Arrays and Methods MIS 3023 Business Programming Concepts II The University of Tulsa Professor: Akhilesh Bajaj All slides in this presentation ©Akhilesh.
Review :chapters What is an algorithm? A step by step description of how to accomplish a task. For example, Adding 3 numbers N1, N2 and N3 Add.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
 Problem Analysis  Coding  Debugging  Testing.
CS100Lecture 61 Announcements Homework P1 due on Thursday Homework P2 handed out.
11 Making Decisions in a Program Session 2.3. Session Overview  Introduce the idea of an algorithm  Show how a program can make logical decisions based.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Introduction to Algorithms
Learning outcomes 5 Developing Code – Using Flowcharts
CSCI-235 Micro-Computer Applications
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Chapter 5: Control Structures II
Introduction to Computer Programming
Understand the Programming Process
User-Defined Functions
Subroutines Idea: useful code can be saved and re-used, with different data values Example: Our function to find the largest element of an array might.
Problem Solving Techniques
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Problem Solving and Algorithm Design
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Understand the Programming Process
Global Challenge Walking for Water Lesson 2.
Algorithms.
Programming Fundamentals (750113) Ch1. Problem Solving
Introduction to Algorithms
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Java for Beginners University Greenwich Computing At School DASCO
Programming Fundamentals (750113) Ch1. Problem Solving
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Computational Thinking
Basic Concepts of Algorithm
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Recursive Thinking.
Presentation transcript:

THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS OF A SOLUTION TO A PROBLEM C- DETERMINE THE ORDER OF THE STEPS NEEDED TO SOLVE A PROBLEM D- IDENTIFY SUB-PROCEDURES NECESSARY TO SOLVE A PROBLEM

GENERALLY SPEAKING, ALL PROBLEMS BEGIN WITH AN IDEA. FINDING THE CONNECTION BETWEEN THIS INFORMATION AND THE SOLUTION LIES AT THE HEART OF PROBLEM SOLVING. TO DO THIS, THE FOLLOWING STRATEGIES CAN BE UTILISED.

The Programming Process Developing a program involves steps similar to any problem-solving task. There are five main ingredients in the programming process: 1.Defining the problem 2.Planning the solution 3.Coding the program 4.Testing the program 5.Documenting the program

A- IDENTIFY THE COMPONENTS OF A PROBLEM Decomposition Part of being a computer scientist is breaking down a big problem into the smaller problems that make it up. If you can break down a big problem into smaller problems then you can give them to a computer to solve. For example if I gave you a cake and asked you to bake me another one you might struggle, but if you watched me making the cake and worked out the ingredients then you'd stand a much better chance of replicating it. If you can look at a problem and work out the main steps of that problem then you'll stand a much better chance of solving it.

Pattern generalisation and abstraction Once we have recognised a pattern we need to put it in its simplest terms so that it can be used whenever we need to use it. For example, if you were studying the patterns of how people speak, we might notice that all proper English sentences have a subject and predicate.

ALGORITHM DESIGN ONCE WE HAVE OUR PATTERNS AND ABSTRACTIONS WE CAN START TO WRITE THE STEPS THAT A COMPUTER CAN USE TO SOLVE THE PROBLEM. WE DO THIS BY CREATING ALGORITHMS. ALGORITHMS AREN'T COMPUTER CODE, BUT ARE INDEPENDENT INSTRUCTIONS THAT COULD BE TURNED INTO COMPUTER CODE. WE OFTEN WRITE THESE INDEPENDENT INSTRUCTIONS AS PSEUDO CODE. EXAMPLES OF ALGORITHMS COULD BE TO DESCRIBE ORBIT OF THE MOON, THE STEPS INVOLVED IN SETTING UP A NEW ONLINE SHOPPING ACCOUNT OR THE SEQUENCES OF TASKS INVOLVED FOR A ROBOT TO BUILD A NEW CAR.

declare robot; robot.on; robot.get(body); robot.get(roof); do robot.weld(roof, body); until (robot.weld == success) robot.off;

SUPPOSE THAT, AS A PROGRAMMER, YOU ARE CONTACTED BECAUSE YOUR SERVICES ARE NEEDED. YOU MEET WITH USERS FROM THE CLIENT ORGANIZATION TO ANALYSE THE PROBLEM, OR YOU MEET WITH A SYSTEMS ANALYST WHO OUTLINES THE PROJECT. SPECIFICALLY, THE TASK OF DEFINING THE PROBLEM CONSISTS OF IDENTIFYING WHAT IT IS YOU KNOW (INPUT-GIVEN DATA), AND WHAT IT IS YOU WANT TO OBTAIN (OUTPUT-THE RESULT). EVENTUALLY, YOU PRODUCE A WRITTEN AGREEMENT THAT, AMONG OTHER THINGS, SPECIFIES THE KIND OF INPUT, PROCESSING, AND OUTPUT REQUIRED. THIS IS NOT A SIMPLE PROCESS.

B-IDENTIFY THE COMPONENTS OF A SOLUTION TO A PROBLEM Evaluate whether the order in which activities are undertaken will result in the required outcome. look the role of sub-procedures(routine) in solving a problem. DON’T REINVENT THE WHEEL

C- DETERMINE THE ORDER OF THE STEPS NEEDED TO SOLVE A PROBLEM Identify when decision-making is required in a specified situation. Identify the decisions required for the solution to a specified problem. Identify the condition associated with a given decision in a specified problem. Apply logical rules for real-world situations.

D- IDENTIFY SUB-PROCEDURES NECESSARY TO SOLVE A PROBLEM Check the syntax and the logical error call the subroutine correctly and what it will do when it is called. Such as the number of parameters, and the type of each parameter. This is the information needed to write a subroutine call statement that can be successfully compiled.

int smallest; int x; int y; int z; if (x <= y && x <= z) { return x; } else if (y <= x && y <= z) { return y; } else return z; } Parameters Sub-routine Functions

PUBLIC CLASS SUB { PUBLIC STATIC VOID MAIN (STRING[] ARGS){ INT NUMBEROFSTARS=5; FOR (INT I = 0; I < NUMBEROFSTARS; I++) { SYSTEM.OUT.PRINT('*'); } SYSTEM.OUT.PRINTLN(); } } Parameters Sub-routine Functions