Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Programming

Concepts
Expected Outcomes
• describe the meaning of flowcharts and flowcharts as a tool to
represent program logic sequence.

•Explain the function of each flowcharting symbols

•Solve a simple programming problem and write a solution in a form


of flowcharts
Application of Programming?
• Population forecasting for urban planning, water supply &
sewerage system.

• Risk assessment and mitigation such as prediction of floods,


earthquakes, cyclones.

• Predicting traffic trends in Highway engineering.

• Soil simulation and modeling in Geotechnical engineering.


Application of Programming?
•Finite element applications in Structural engineering.

•Construction management.

•ML (Machine Learning) applications such as automation in structural


design and drawings.
What is a program?
• A collection of instructions that performs a specific task when
executed by a computer.

• A computer requires programs to function.

Program = Algorithms + Data


Algorithms
•Logical process by which a problem can be solved or a decision
made, it can be presented through Flowchart and Pseudocode

•Algorithms are used extensively in computer programming to arrive


at a solution for a problem
What is a Flowchart?
• Pictorial representation of an ordered step-by-step solution to a
problem

• Representation of all other kinds of processes


Flowchart symbols
Terminator
The terminator symbol represents the starting or ending point of
the system.

Process
A box indicates some particular operation.

Decision
A diamond represents a decision or branching point. Lines coming
out from the diamond indicates different possible situations,
leading to different sub-processes.
Flowchart symbols
Flow
Lines represent flow of the sequence and direction of a process

Preparation
Represents a set-up to another step in the process.

Data
It represents information entering or leaving the system. An input
might be an order from a customer. An output can be a product
to be delivered.
Flowchart symbols
Display
Indicates a step that displays information.

On-Page Reference
Contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on the
same page.

Off-Page Reference
Contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on a
different page.
Sample Flowchart
Developing Flowcharts
- Defining the problem.

- Identify the various steps required to form a solution.

- Determine the required input and output parameters.

- Get expected input data values and output result.

- Determine the various computations and decisions involved.


Advantages of using flowchart
• Easier for the programmer to explain the logic of the program

•Flowcharts provide a strong documentation in the overall


documentation of the software system.

•A flowchart is very helpful in the process of debugging a program.


Pseudocode
An English-like language that you can use to state your solution
with more precision than you can in plain English.

Start
Read X, Y, Z
Compute Sum (S) as X + Y + Z
Compute Product (P) as X * Y * Z
Write (Display) the sum, Average
and product
Stop
Seatwork

You might also like