0% found this document useful (0 votes)
9 views

2 Problem Solving Technique

The document outlines a structured approach to problem solving in programming, detailing steps such as problem analysis, design, coding, compilation, debugging, and documentation. It provides examples of potential problems to solve and emphasizes the importance of algorithms, flowcharts, and pseudo code in the design process. Additionally, it discusses the compilation and debugging processes, as well as the types of documentation necessary for effective programming.

Uploaded by

rifat41213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

2 Problem Solving Technique

The document outlines a structured approach to problem solving in programming, detailing steps such as problem analysis, design, coding, compilation, debugging, and documentation. It provides examples of potential problems to solve and emphasizes the importance of algorithms, flowcharts, and pseudo code in the design process. Additionally, it discusses the compilation and debugging processes, as well as the types of documentation necessary for effective programming.

Uploaded by

rifat41213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1

Problem
Solving
Technique
Using Computer
2

Course Instructor:
Md. Shadmim Hasan Sifat
Lecturer, CSE, SUST
3
What is it ?
“Problem Solving” in the context of programming
involves a
structured approach to
✓ Identify
✓Analyze
✓Solve
problems…
Problem Solving Using Computer 4
Steps
1) Problem Analysis
2) Design
3) Coding
4) Compilation & Execution
5) Debugging & Testing
6) Documentation

Compilation & Debugging & Computer


Problem Analysis Design Coding Documentation
Execution Testing Software
Possible Problems in our Daily Life 5
Select A Problem 14. Number Plate Registration 27. Prescription Log
System,
1. Student Mgmt. System, 28. Tic-tac-toe
15. Tax Payment System,
2. Employee Mgmt. System, 29. Bag Chal
16. eWallet,
3. Library System, 30. Hostel Mgmt. System
17. Mini-Mart Billing System,
4. eAttendance Mgmt. 31. Date Converter
System, 18. Tourist Entry Logger, 32. Marksheet Generator
5. Pharmacy Mgmt. System, 19. Feedback Mgmt. System, 33. Hangman
6. Blood Bank Mgmt. System,20. Project Info. System,
34. Scientific Calculator
7. Kitchen Recipie 21. Khwopa Quiz
35. Telephone Directory
8. Workers’ Time Logger 22. Class Routine Mgmt.
System 36. eVoting
9. Hospital Mgmt. System,
23. Bank Mgmt. System 37. Puzzle
10. Hotel Reservation System,
38. Data
24. Student Payroll System
11. Inventory Mgmt. System, Encryption/Decryption
25. Break-Game
12. Canteen Billing System, 39. Data Compression
26. Land Converter
13. Task Reminder
1. Problem Analysis 6

Problem Analysis
a) Objectives
b) Output Requirements
c) Input Requirements
d) Processing Requirements
e) Evaluating Feasibility

Problem Analysis: Design a program to calculate area of circle?

Radius, Pi Calculate Area


2. Program Design 7

Algorithm Development Flowcharting


Features of Algorithm Advantages
Communication
Sequence
Effective Analysis
Decision Proper
Repetition Documentation
Efficient Coding
Easy in Debugging
& Maintenance
Limitations
Complex Logic
Difficulty in
Alteration &
Modifications
2.1 Algorithm 8
a process or set of rules to be followed in calculations or other problem-
solving operations

Basic Guidelines to prepare Algorithms


Use plain language
Do not use any language specific
syntax. One must be able to code
the algorithm in any programming
language.
Do not assume anything stating
everything clearly and explicitly.
Ensure each algorithm has a single
entry & exit point.
Write an algorithm to calculate 9

area of circle.
Steps Other Problems:
Step1: Start 1. Write an algorithm to calculate
simple interest. (SI = PTR/100)
Step2: Define constant variable PI
which holds value 3.1415 2. Write an algorithm to determine
a number whether it is positive or
Step3: Define variables: radius, area negative.
Step4: Read radius 3. Write an algorithm to test a
number for even or odd.
Step5: Calculate Area of Circle:
4. Write an algorithm to find the
area = PI * radius * radius largest among three numbers.
Step6: Display area of circle 5. Write an algorithm for finding the
Step7: Stop sum of series 1+2+3+4+… up to n
terms
Flowchart to calculate area of circle:

2.2 Flowchart Start 10

Define a constant PI = 3.1415,


other variables: radius, area

Read: radius

area = PI * radius * radius

Display Area

1. Draw a flowchart to calculate simple interest.


2. Draw a flowchart to test positive or negative no. Stop

3. Draw a flowchart to test a number for even or odd.


4. Draw a flowchart to find the largest among three numbers.
5. Draw a flowchart for finding the sum of series 1+2+3+4+… up to n terms
2.3 Pseudo Code 11
- Dummy sequence of instructions to Computer
- Mixture of structured English & code

Write a pseudo code to calculate ➢ Write a pseudo code to read marks


Simple Interest. of a student in Computer
Pseudo Code: Programming and display whether
Begin s/he is pass or fail in the exam. The
pass Mark is 40.
Read values of P, T, R
➢ Write a pseudo code to read three
Calculate P*T*R/100 integers and display the lowest
& assign to variable I among them.
➢ Write a pseudo code to read a non-
(I <- P*T*R/100)
zero positive integer and display the
Display I
count of odd and even digits in it.
End E.g. 123 => odd = 2, even = 1
Coding 12
Compilation & Execution 13

Program
Compilation Linking Loading Execution
Code

Compiler Linker Loader

Compilation Process ➢ The process of changing high level language


into machine level language is known as
1. Pre-processing
compilation. [Conversion to Object Program]
2. Compilation
➢ During execution, the program may ask for
3. Assembling & user for inputs and generates outputs after
4. Linking processing the inputs.
Debugging & Testing 14
Debugging - Process of finding & resolving defects or problems within a computer program
Testing - Activity to check whether the actual results match the expected results and to ensure
that the software system is Defect free.
Tools for debugging process
Watch Values
Stepping (F7)
Simulators
Logic Analyzer
Breakpoints
Trace Routines
Software Interrupts

Error Category
Syntax Error
Semantic Error
Runtime Error
Memory Overflow
Floating Point Error
Program Documentation 15

Techniques for Program Types of Documentations


Documentations 1. Technical Documentation
Diagrams
2. User Manual
Flowchart,
Data Flow Diagram
(DFD),
E-R Diagram (ERD)
Comments
Memory Maps
Parameter &
Definition Lists
16

Understand the Problem

Break Down the Problem

In Summary: Research and Gather Information

Brainstorming Possible Solutions


Problem Evaluate and Select Solutions
Solving Develop an Action Plan

Technique Implement the Solution

in Step-By-Step Test Solutions

Optimize and Refactor

Document and Review


Q/A? 17

Thank You!
Feel free to ask any question !!!

You might also like