SlideShare a Scribd company logo
1 of 34
TTLM Code: ICT DBA3 05 0710
UC : Design A Database 1
1. Attendance (10%)
2. Quizzes:- (10%)
3. Theory exam (30%) 5/5/2015
4. Lab Assessment (50%) 8/5/2015
LO1: Select the Program Design Approach
LO2: Document the program logic or design
LO3: Validate the Design
UC : Design A Database 3
1.1 Obtaining Design Documentation and
Requirement for the Program Clarification
1.1.1Pseudo code
 Pseudocode is an informal high-level
description of the operating principle of a
computer program or other algorithm.
UC : Design A Database
4
 Pseudocode
English-like representation of a program
It could be viewed as the outline of a program
It can’t be compiled or executed.
The focus is on solving the problem, not
worrying about the specifics of a
programming Language.
UC : Design A Database 5
 It uses the structural conventions of a
programming language, but is intended for
human reading rather than machine reading.
 Pseudocode typically omits details that are not
essential for human understanding of the
algorithm, such as variable declarations,
system-specific code and some subroutines.
UC : Design A Database 6
 The programming language is augmented with
natural language description details, where
convenient, or with compact mathematical
notation.
 The purpose of using pseudocode is that it is
easier for people to understand than conventional
programming language code, and that it is an
efficient and environment-independent
description of the key principles of an algorithm.
UC : Design A Database 7
 It is commonly used in textbooks and scientific
publications that are documenting various
algorithms, and also in planning of computer
program development, for sketching out the
structure of the program before the actual coding
takes place
UC : Design A Database 8
 When we write programs, we assume that the
computer executes the program starting at the
beginning and working its way to the end. We call
this sequence
 SEQUENCE is a linear progression where one
task is performed sequentially after another.
In pseudo code it look like this
UC : Design A Database 9
Statement 1;
Statement 2;
Statement 3;
Statement 4;
Statement 5 ;
Example, for making a cup of tea:
Organize everything together;
Plug in kettle;
Put teabag in cup;
Put water into kettle;
Wait for bottle to boil;
Add water to cup;
Remove teabag with spoon/fork/;
Add milk and /or sugar;
Serve;
UC : Design A Database 10
 What if we need to tell the computer to keep
doing something until some condition occurs?
Let’s say we wish to indicate that you need to
keep filling the kettle with water until it is full.
We call this a loop.
 WHILE is a loop (repetition) with a simple
conditional test at its beginning Or, in general
UC : Design A Database 11
While (<condition>)
Do <Statements>;
Endwhile;
As we could state this as:
While (Kettle is not
full)
Do keep filling Kettle;
EndWhile;
Example, above:
Organize everything together;
Plug in kettle;
Put teabag in cup;
While (Kettle is not full)
Do keep filling Kettle;
EndWhile;
Wait for bottle to boil;
Add water to cup;
Remove teabag with spoon/fork/;
Add milk and /or sugar;
Serve;
UC : Design A Database 12
 What if we want to make a choice, for example,
do we want add sugar or not to the tea? We call
this selection.
 IF-THEN-ELSE is a decision (selection) in
which a choice is made between two alternative
courses of action.
UC : Design A Database 13
UC : Design A Database 14
 A flow chart is a graphical or symbolic
representation of a process.
 Each step in the process is represented by a
different symbol and contains a short
description of the process step.
 The flow chart symbols are linked together with
arrows showing the process flow direction.
UC : Design A Database 15
• Pictorial representation of a program
• Can be created with pencil and paper,
Microsoft Word, PowerPoint, Visio (a copy
of this is in the back of the Farrell book), etc.
• For this class, all flowcharts must be done in
Visio
UC : Design A Database 16
UC : Design A Database 17
UC : Design A Database 18
1) Sequence
2) Selection
3) Repetition
UC : Design A Database 19
1) Sequence
UC : Design A Database 20
2) Selection
UC : Design A Database 21
1) Sequence:
These is the types of control structure in
which program flows from top to bottom
sequentially without changing the flow of
program execution.
None of the program statements are
skipped or repeated. Every statements are
executed one after another.
UC : Design A Database 22
#include
int main ( )
{
int a=5,b=3,c;
c=a+b;
printf(“Value is
%d”, c);
return 0;
}
UC : Design A Database 23
Here, in this above
program example, every
statements are executed
line by line from top left
to right bottom.
None of the statements
are skipped and repeated.
3) Repetition
UC : Design A Database 24
 A program is required to read three numbers, add
them together and print their total.
 Pseudo code
Add_three_numbers
Read number1, number2, number3
Total = number1 + number2 + number3
Print total
END
UC : Design A Database 25
Input Processing Output
Number1
Number2
Number3
Read three numbers
Add number together
Print total number
total
UC : Design A Database 26
Defining diagram
#include
int main ( )
{
int a=5,b=3,c;
c=a+b;
printf(“Value is %d”, c);
return 0;
}
UC : Design A Database 27
UC : Design A Database 28
 The following flow
chart example
presents a very simple
flow chart for the
process of getting out
of bed in the morning.
UC : Design A Database 29
UC : Design A Database 30
 A program is required to prompt the terminal
operator for the maximum and minimum
temperature readings on a particular day,
accept those readings as integers, and calculate
and display to the screen the average
temperature, calculated by (maximum
temperature + minimum temperature)/2.
Input Processing Output
Max_temp
Min_temp
Prompt for temperatures
Get temperatures
Calculate average temperature
Display average temperature
total
UC : Design A Database 31
Defining diagram
Pseudo code
Find average_temperature
Prompt operator for max_temp, min_temp
Get max_temp, min_temp
Avg_temp= (max_Temp + min_temp)/2
Output avg_temp to the screen
END
UC : Design A Database 32
Flow Chart
UC : Design A Database 33
 https://www.filehorse.com/download-visual-
paradigm-community-edition/
UC : Design A Database 34

More Related Content

Similar to ICT DBA3 03 0710 Design Program Logic.pptx

L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
rosemarybdodson23141
 

Similar to ICT DBA3 03 0710 Design Program Logic.pptx (20)

L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
program development and paradigms
program development and paradigmsprogram development and paradigms
program development and paradigms
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Programing Fundamental
Programing FundamentalPrograming Fundamental
Programing Fundamental
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
learn computer science.ppt
learn computer science.pptlearn computer science.ppt
learn computer science.ppt
 
Book management system
Book management systemBook management system
Book management system
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
CP Handout#1
CP Handout#1CP Handout#1
CP Handout#1
 
6272 cnote
6272 cnote6272 cnote
6272 cnote
 

More from Infotech27 (7)

normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
 
ICT DBA3 03 0710 Design Program Logic.pptx
ICT DBA3 03 0710 Design Program Logic.pptxICT DBA3 03 0710 Design Program Logic.pptx
ICT DBA3 03 0710 Design Program Logic.pptx
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
ICT-DBA-level4
ICT-DBA-level4ICT-DBA-level4
ICT-DBA-level4
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

ICT DBA3 03 0710 Design Program Logic.pptx

  • 1. TTLM Code: ICT DBA3 05 0710 UC : Design A Database 1
  • 2. 1. Attendance (10%) 2. Quizzes:- (10%) 3. Theory exam (30%) 5/5/2015 4. Lab Assessment (50%) 8/5/2015
  • 3. LO1: Select the Program Design Approach LO2: Document the program logic or design LO3: Validate the Design UC : Design A Database 3
  • 4. 1.1 Obtaining Design Documentation and Requirement for the Program Clarification 1.1.1Pseudo code  Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. UC : Design A Database 4
  • 5.  Pseudocode English-like representation of a program It could be viewed as the outline of a program It can’t be compiled or executed. The focus is on solving the problem, not worrying about the specifics of a programming Language. UC : Design A Database 5
  • 6.  It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading.  Pseudocode typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. UC : Design A Database 6
  • 7.  The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation.  The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. UC : Design A Database 7
  • 8.  It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place UC : Design A Database 8
  • 9.  When we write programs, we assume that the computer executes the program starting at the beginning and working its way to the end. We call this sequence  SEQUENCE is a linear progression where one task is performed sequentially after another. In pseudo code it look like this UC : Design A Database 9
  • 10. Statement 1; Statement 2; Statement 3; Statement 4; Statement 5 ; Example, for making a cup of tea: Organize everything together; Plug in kettle; Put teabag in cup; Put water into kettle; Wait for bottle to boil; Add water to cup; Remove teabag with spoon/fork/; Add milk and /or sugar; Serve; UC : Design A Database 10
  • 11.  What if we need to tell the computer to keep doing something until some condition occurs? Let’s say we wish to indicate that you need to keep filling the kettle with water until it is full. We call this a loop.  WHILE is a loop (repetition) with a simple conditional test at its beginning Or, in general UC : Design A Database 11
  • 12. While (<condition>) Do <Statements>; Endwhile; As we could state this as: While (Kettle is not full) Do keep filling Kettle; EndWhile; Example, above: Organize everything together; Plug in kettle; Put teabag in cup; While (Kettle is not full) Do keep filling Kettle; EndWhile; Wait for bottle to boil; Add water to cup; Remove teabag with spoon/fork/; Add milk and /or sugar; Serve; UC : Design A Database 12
  • 13.  What if we want to make a choice, for example, do we want add sugar or not to the tea? We call this selection.  IF-THEN-ELSE is a decision (selection) in which a choice is made between two alternative courses of action. UC : Design A Database 13
  • 14. UC : Design A Database 14
  • 15.  A flow chart is a graphical or symbolic representation of a process.  Each step in the process is represented by a different symbol and contains a short description of the process step.  The flow chart symbols are linked together with arrows showing the process flow direction. UC : Design A Database 15
  • 16. • Pictorial representation of a program • Can be created with pencil and paper, Microsoft Word, PowerPoint, Visio (a copy of this is in the back of the Farrell book), etc. • For this class, all flowcharts must be done in Visio UC : Design A Database 16
  • 17. UC : Design A Database 17
  • 18. UC : Design A Database 18
  • 19. 1) Sequence 2) Selection 3) Repetition UC : Design A Database 19
  • 20. 1) Sequence UC : Design A Database 20
  • 21. 2) Selection UC : Design A Database 21
  • 22. 1) Sequence: These is the types of control structure in which program flows from top to bottom sequentially without changing the flow of program execution. None of the program statements are skipped or repeated. Every statements are executed one after another. UC : Design A Database 22
  • 23. #include int main ( ) { int a=5,b=3,c; c=a+b; printf(“Value is %d”, c); return 0; } UC : Design A Database 23 Here, in this above program example, every statements are executed line by line from top left to right bottom. None of the statements are skipped and repeated.
  • 24. 3) Repetition UC : Design A Database 24
  • 25.  A program is required to read three numbers, add them together and print their total.  Pseudo code Add_three_numbers Read number1, number2, number3 Total = number1 + number2 + number3 Print total END UC : Design A Database 25
  • 26. Input Processing Output Number1 Number2 Number3 Read three numbers Add number together Print total number total UC : Design A Database 26 Defining diagram
  • 27. #include int main ( ) { int a=5,b=3,c; c=a+b; printf(“Value is %d”, c); return 0; } UC : Design A Database 27
  • 28. UC : Design A Database 28
  • 29.  The following flow chart example presents a very simple flow chart for the process of getting out of bed in the morning. UC : Design A Database 29
  • 30. UC : Design A Database 30  A program is required to prompt the terminal operator for the maximum and minimum temperature readings on a particular day, accept those readings as integers, and calculate and display to the screen the average temperature, calculated by (maximum temperature + minimum temperature)/2.
  • 31. Input Processing Output Max_temp Min_temp Prompt for temperatures Get temperatures Calculate average temperature Display average temperature total UC : Design A Database 31 Defining diagram
  • 32. Pseudo code Find average_temperature Prompt operator for max_temp, min_temp Get max_temp, min_temp Avg_temp= (max_Temp + min_temp)/2 Output avg_temp to the screen END UC : Design A Database 32
  • 33. Flow Chart UC : Design A Database 33