logo

Lecture on Problem Solving & Flowcharts

36 Pages1691 Words24 Views
   

Added on  2022-09-14

Lecture on Problem Solving & Flowcharts

   Added on 2022-09-14

ShareRelated Documents
1
Lecture on
Problem Solving & Flowcharts (I)
Lecture on Problem Solving & Flowcharts_1
2
Overview

Algorithm

Program design

Pseudocode

Structure diagram

Flowcharts
Lecture on Problem Solving & Flowcharts_2
3
Algorithm

Algorithm

A sequence of precise instructions which
leads to a solution

Program

An algorithm expressed in a language the
computer can understand
Lecture on Problem Solving & Flowcharts_3
4
Program Design

Programming is a creative process

No complete set of rules for creating a program

Program Design Process

Problem Solving Phase

Result is an algorithm that solves the problem

Implementation Phase

Result is the algorithm translated into a programming
language
Lecture on Problem Solving & Flowcharts_4
5
Problem Solving Phase

Be certain the task is completely specified

What is the input?

What information is in the output?

How is the output organized?

Develop the algorithm before implementation

Experience shows this saves time in getting your
program to run.

Test the algorithm for correctness
Lecture on Problem Solving & Flowcharts_5
6
Implementation Phase

Translate the algorithm into a programming language

Easier as you gain experience with the language

Compile the source code

Locates errors in using the programming language

Run the program on sample data

Verify correctness of results

Results may require modification of the algorithm and
program
Lecture on Problem Solving & Flowcharts_6
7
Software Life Cycle

Analysis and specification of the task
(problem definition)

Design of the software
(object and algorithm design)

Implementation (coding)

Maintenance and evolution of the system

Obsolescence
Lecture on Problem Solving & Flowcharts_7
8
8

Input Processing Output

Names for our cells

5, 10
15
1) Declare variables

input_1

input_2

sum

2) Assign values

input_1 = 5

input_2 = 10

3) Process

sum = input_1 + input_2

The computer (and so C++)

provides basic arithmetic

operations. If the operation

you want to use is not provided,

you have to compose it.

Sample problems

Write a program calculating the sum of two numbers
Lecture on Problem Solving & Flowcharts_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Programming, Algorithms and Data Structure: Weekly Tasks and Exercises
|2
|501
|348

Programming in Python: Constructing a Model of a Byte Adder
|2
|623
|132

Definition of Algorithm and Process of Building an Application
|8
|1804
|83

SEO for Desklib
|2
|890
|424

Thinking Technology and Design - Program Algorithms and Pseudocode
|6
|694
|181

Case Study: Wage Commission Application Development
|28
|5209
|493