Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structured Programming (4 Credits)

Similar presentations


Presentation on theme: "Structured Programming (4 Credits)"— Presentation transcript:

1 Structured Programming (4 Credits)
HNDIT11034 Structured Programming (4 Credits)

2 Module Aims & objectives
Enhance skills for the development of application programmes through systematic problem solving skills

3 Learning Outcomes Apply systematic approach to problem solving
Use appropriate data types for representation of data within a programme Use appropriate control structures for defining logical instruction flow Demonstrate basic programme testing skills inclusive of debugging and tracing.

4 Assessment and Weighting
Continuous Assessment Tutorials and lab assignments related to classroom teaching - 25% Mini programming project 25% End of semester examination Structured written paper 50%

5 Week 1 – Learning Outcomes
Define a computer program Explain what is programming Describe the importance of programs and programming Describe the evolution of programming Design an algorithmic solution for simple problem such as computation of a factorial, total of a series etc. using flow charts

6 Introduction A computer program is a set of instructions or commands, which tell the computer what to do. A computer language is a set of symbols and rules used in constructing programs. Computer languages are used to develop application programs

7 Program Development Life Cycle
Six main phases Define the problem Design the solution Code the program Test the program Document the program Implement the program 7

8 Translator Source Code Object Code

9 1st Generation 2nd Generation Computer Language 3rd Generation
Low Level Language High Level Language 1st Generation 2nd Generation 3rd Generation 4th Generation 5th Generation Computer Language

10 They are machine dependant languages
Low Level Languages First and second generation languages are considered low level languages. They are machine dependant languages These languages are close to the hardware The programmer should have hardware knowledge to write a program Productivity is low

11 3GL,4GL and 5GL are considered high level languages
They are machine independent languages It is easy to write and modify The programmer does not need knowledge of hardware to write programs Productivity is high Consume less time to write programs Translators need to be used to convert to machine language

12 Design the Solution Design an algorithm.
An algorithm is a finite series of logical steps required to solve a particular problem. Finite means that the beginning and end are clearly defined. 12 12

13 Flowcharting A flowchart is a pictorial representation of an algorithm or logical steps. Each step is represented by a symbol and the arrows indicate the flow and order of the steps. The shape of the symbol indicates the type of operation that is to occur. 13

14 Basic Flowchart Symbols
Begin or End Input or Output Processing Decision Branch or Direction of Flow 14

15 Flow Control Structures
Flow control is the order in which statements are executed. There are four control structures. Sequence Control Selection Control Also referred to as branching (if and if-else) Repetition Control (loops) 15

16 Sequence Control 16

17 Selection Control (branching)
17

18 Repetition Control (loops)
18 18

19 Flowchart for Processing Credit Orders
Enter sales order Approved for credit? Reject Inventory available? Back- Fill order Stop Start No Yes

20 Draw a flow chart to cross the road.
Start Go to pavement Look at left & right Yes No Are clear both ways? Cross the road Wait Stop

21 Draw a flow chart to find the correct key from a bunch keys to open the door.
Start Tryout a key Can the door be opened Yes No Try the next key Stop

22 Discussion How to apply flowchart to design solution for a computational problems. (Discuss few from the lab sheet)

23 Q & A


Download ppt "Structured Programming (4 Credits)"

Similar presentations


Ads by Google