FCCS1013 Chapter 1
FCCS1013 Chapter 1
Learning Outcomes
Define Problem Solving.
Recognize 6 steps in problem solving.
Recognize 7 steps in program development process.
Describe Procedural Programming Language.
Describe Program Development Tools (Techniques).
Problem Solving in Everyday Life
Problem-solving process (6 steps)
doing assignment.
Method 4 : might be expensive
doing assignment.
Output
payment
Process
Payment = original price x (100% - discount rate)
2 Outline the Solution
This initial outline is usually a rough draft of the
solution and may include:
• The major processing steps involved
• The major subtasks (if any)
• The user interface (if any)
• The major control structures (e.g. repetition loops)
• The major variables and record structures
• The mainline logic
2 Outline the Solution
Example :
Get the price of product purchase by the customer
Get the discount rate
Calculate the discount amount
Calculate the payment after discount
Display the payment amount to the customer
3 Develop the Outline into an Algorithm
The solution outline developed in Step 2 is expanded
into an algorithm: a set of precise steps that describe
exactly the tasks to be performed and the order in
which they are to be carried out
4 Test the Algorithm for Correctness
This step is one of the most important in the
development of a program, and yet it is the step most
often forgotten
algorithm
What Is an Algorithm?
An algorithm is like a recipe: it lists the steps
involved in accomplishing a task