Design Programing Logic
Design Programing Logic
Design Programing Logic
Sector of ICT
2 2
program logic Documentation
3
5
Nominal duration:50Hours
program logic design
1
This unit will also assist you to attain the learning
outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you
will be able to:
Preliminary investigation
Analysis
Design
Implementation
Deployment and Testing
Maintenance
A. Preliminary investigation:
purpose
To determine whether the problem or deficiency in the current system
really exists.
The project team may re-examine some of the feasibility aspects of the
project.
The end result is a decision to proceed further or to abandon the project.
Defining the problem: E.g. Examines documents, work papers, and
procedures; Observe system operations; interview key users of the system.
Suggesting a solution e.g. often improving an existing one or building a
new information system.
Determine whether the solution is feasible.
In the analysis phase end user business requirements are analyzed and project
goals converted into the defined system functions that the organization
intends to develop.
Try to understand the business in general (activities done, how it is done,
etc)
Define the specific information requirements, who needs what
information, where, when and how.
C, Design phase: In the design phase, we describe the desired features and
operations of the system.
This phase includes business rules, pseudo-code, screen layouts, and other
necessary documentation.
D. Implementation:
In the implementation phase, the development team codes the product.
Implementation includes user notification, user training, installation of
hardware, installation of software onto production computers, and
integration of the system into daily work processes.
This phase continues until the system is operating in production in
accordance with the defined user requirements.
E. Deployment and Testing:
When teams develop software, they code and test on a different copy of the
software than the one that the users have access to.
The software that customers use is called production, while other copies are
said to be in the build environment, or testing environment.
F. Maintenance:
In the maintenance phase, among other tasks, the team fixes bugs, resolves
customer issues, and manages software changes.
In addition, the team monitors overall system performance, security, and
user experience to identify new ways to improve the existing software.
Program logic is a picture of why and how you believe a program or a policy
will work.
Program logic demonstrates design & implementation of competence.
Program logic provides a chain of reasoning that links investments with results.
Program logic is a series of “if-then” relationships that, if implemented as intended, lead to
the desired outcomes
Logic model
Logic models provide a kind of map for a program or initiative, helping clarify
a program or policy’s destination, the pathways toward the destination, and
markers along the way. In this consider:
Program planning.
Program implementation.
Program monitoring.
Program evaluation.
Brings detail to broad goals.
Helps identify gaps in program logic and clarify assumptions.
Builds understanding and promotes consensus.
Makes explicit underlying beliefs.
Helps clarify what is appropriate to evaluate and when.
Summarizes complex programs for effective communication
. Program of requirements
A specification of requirements or Program of Requirements is a document
used in a design or procurement process.
An algorithm is,
Precise and unambiguous (No ambiguity in any instruction and in the order of
execution)
Correct,
Finite (has to have an end),
Handles all exceptions,
Efficient in time, memory and other resources,
Many different methods exist for constructing algorithms, (An algorithm can be
expressed in many ways). Some of those methods are Flowchart and Pseudo-code.
Pseudo code
Pseudo code is defined as a step-by-step description of an algorithm.
Pseudo code does not use any programming language in its representation instead it uses
the simple English language text as it is intended for human understanding rather than
machine reading.
Pseudo code is the intermediate state between an idea and its implementation (code) in a
high-level language.
Pseudo code is an intermediate state between algorithm and program that plays supports
the transition of the algorithm into the program.
Statement 1;
Statement 2;
Statement 3;
Statement 4;
Statement 5;
Pseudo Code with LOOP
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.
While (<condition>)
Do <Statements>;
Endwhile;
As we could state this as:
While (Kettle is not full)
Do keep filling Kettle;
EndWhile
Pseudo Code with SELECTION
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 or in general:
If (<condition>)
Then <Statement>;
Else <Statement>;
EndIf;
If (Sugar is required)
Then add Sugar;
Else do nothing;
EndIf;
Example3. A pseudo-code that calculates grade hint Grade A>=80, B>=60,
C>=50, D>=40, F<40
ACCEPT Mark, Name
IF Mark>80 Then
Grade A
ELSE IF Mark >60 Then
Grade B
ELSE IF Mark >50 Then
Grade C
ELSE IF Mark >40 Then
Grade D
ELSE
Grade F
ENDIF
Display Grade, Name
Flowcharts
A flow chart is a graphical or symbolic representation of a process (Pictorial
representation of a program).
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.
In other word Flowchart is pictorial representation of the logic & the purpose of
flowcharts is to represent graphically the logical decisions and progression of steps in
the physical completion of a task.
Symbol set
There are seven commonly used symbols in
flowcharting. However, be aware that people can
create their own symbol set.
The most common symbols that can be used to
represent the main concept include:
Terminator: marks the beginning and end of a flowchart.
Process: indicates that an operation changed or manipulated the data in some
way.
Data or input/output: an operation that inputs or outputs data.
Decision: a logical decision point (e.g., if, then; true/false).
On-page connector: the logic continues at another place on the same page.
Off-page connector: the logic continues on a different page.
Predefined process: a predefined process or subroutine (similar to a
predefined function or process in database programming).
Six basic flowchart shapes
The circle is for connecting parts of the flowchart to other parts. This is especially
Useful if the flowchart covers more than one page
A decision block implies IF-THEN-ELSE. A condition (“it’s the case that something
is true …”, or “while x is true …”) is tested: if the condition is true, the logic
associated with the “THEN” branch is performed while the ELSE block is skipped. If
the condition is false, then the ELSE logic is executed and the THEN logic is
skipped.
For example, “IF there’s enough gas in the car (condition), THEN (true) I’ll drive
to my friends’ house; ELSE (false, not enough gas) I’ll go to the gas station.
Sometimes the if/then are nested in other if/then conditions: If there’s enough gas
in the car, I’ll go to my friend’s house; if I don’t reach there by noon, I’ll stop at a
restaurant along the way.
Example 4 Add three numbers
A program is required to read three numbers, add them together and print their total.
Pseudo code
Add_three_numbers
Print total
END
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
Flowchart Pseudo code
Flowchart is pictorial representation Pseudo code is a step-by-step
of flow of an algorithm. description of an algorithm in code
like structure using plain English
text.
Flowchart uses standard symbols for Pseudo code uses reserved keywords
input, output decisions and start stop like if-else, for, while, etc.
statements. Only uses different
shapes like box, circle and arrow.
This is a way of visually representing These are fake codes as the word
data, these are nothing but the pseudo means fake, using code like
graphical representation of the structure but plain English text
algorithm for a better understanding instead of programming language
of the code
Flowcharts are good for Pseudo code is better suited for the
documentation purpose of understanding
DFD’s
Data Flow Diagram (DFD)
The Data Flow Diagram (DFD) is a graphical representation of the flow of data
through an information system.
A structured analysis technique that employs a set of visual representations
of the data that moves through the organization, the paths through which the
data moves, and the processes that produce, use, and transform data.
The DFD lets you visualize how the system operates, what
the system accomplishes and how it will be implemented,
when it is refined with further specification.
Data flow diagrams are used by systems analysts to design information-
processing systems but also as a way to model whole organizations
Why Data Flow Diagrams?
• Can diagram the organization or the system
• Can diagram the current or proposed situation
• Can facilitate analysis or design
• Provides a good bridge from analysis to design
• Facilitates communication with the user at all stages
Types of DFDs
• Current - how data flows now
• Proposed - how we’d like it to flow
• Logical - the “essence” of a process (i.e. implementation-independent and describe the
system, rather than how activities are accomplished.)
• Physical - the implementation of a process (i.e. are implementation-dependent and
describe the actual entities (devices, department, people, etc.) involved in the current
system.)
• Partitioned physical - system architecture or high-level design
Context Diagram- Shows just the inputs and outputs of the system
Level 0 Diagram- Decomposes the process into the major sub processes and
identifies what data flows between them
Child diagrams- Increasing levels of detail (i.e. Level 1, Level 2 etc)
Rule 1: Process
Can have more than one outgoing data flow or more than one incoming data flow
Rule 2: Process
Can connect to any other symbol (including another process symbol)
Level 0 Diagram
• Process is “exploded”
• Sources, sinks, and data flows repeated from context diagram
• Process broken down into sub processes, numbered sequentially
• Lower-level data flows and data stores added
Context DFD is the entrance of a data flow model. It contains one and only one process
and does not show any data store.
Level 1 DFD
The figure below shows the level 1 DFD, which is the decomposition (i.e. break down)
of the Food Ordering System process shown in the context DFD.
Read through the diagram and then we will introduce some of the key concepts based
on this diagram.
The Food Order System Data Flow Diagram example contains three processes, four
external entities and two data stores.
Based on the diagram, we know that a Customer can place an Order. The Order Food
process receives the Order, forwards it to the Kitchen, store it in the Order data store,
and store the updated Inventory details in the Inventory data store. The process also
deliver a Bill to the Customer.
Manager can receive Reports through the Generate Reports process, which takes
Inventory details and Orders as input from the Inventory and Order data store
respectively.
Manager can also initiate the Order Inventory process by providing Inventory order.
The process forwards the Inventory order to the Supplier and stores the updated
Inventory details in the Inventory data store.
Hierarchy Input Process Output Diagram (HIPO)
It is a systems analysis design aid and documentation technique from the 1970s,
used for representing the modules of a system as a hierarchy and for
documenting each module.
It is a hierarchy chart that graphically represents the program’s control the
functions (or processes) performed by each module on the system
RAD
What is RAD model- advantages, disadvantages and when to use
it?
RAD model is Rapid Application Development model.
It is a type of incremental model.
In RAD model the components or functions are developed in parallel as if they were
mini projects.
The developments are time boxed, delivered and then assembled into a working
prototype.
This can quickly give the customer something to see and use and to provide feedback
regarding the delivery and their requirements.
Diagram of RAD-Model:
The phases in the rapid application development (RAD) model
are:
Business modeling: The information flow is identified between various business
functions.
Data modeling: Information gathered from business modeling is used to define data
objects that are needed for the business.
Process modeling: Data objects defined in data modeling are converted to achieve the
business information flow to achieve some specific business objective. Description are
identified and created for CRUD of data objects.
Application generation: Automated tools are used to convert process models into code
and the actual system.
Testing and turnover: Test new components and all the interfaces.
Advantages of the RAD model: Disadvantages of RAD model:
Reduced development time. Depends on strong team and individual
Increases reusability of components performances for identifying business
Greater customer satisfaction requirements.
Encourages customer feedback Only system that can be modularized can
Faster delivery time be built using RAD
simple and better quality Requires highly skilled
developers/designers.
It is not appropriate when technical risk is
high
High dependency on modeling skills
Inapplicable to cheaper projects as cost of
modeling and automated code generation is
very high.
When to use RAD model:
RAD should be used when there is a need to create a system that can be modularized
in 2-3 months of time.
It should be used if there’s high availability of designers for modeling and the budget
is high enough to afford their cost along with the cost of automated code generating
tools.
RAD model should be chosen only if resources with high business knowledge are
available and there is a need to produce the system in a short span of time (2-3 months).
Prototyping
What is Prototype model- advantages, disadvantages and
when to use it?
Prototyping is an attractive idea for complicated and large systems for which there
is no manual process or existing system to help determining the requirements.
The prototypes are usually not complete systems and many of the details are not
built in the prototype. The goal is to provide a system with overall functionality.
Diagram of Prototype model:
Many different definitions of CASE tools exist, below are just a few of those:
Galin - CASE tools are computerized software development tools that support the
developer when performing one or more phases of the software life cycle and/or
support software maintenance.
Components of CASE Tools
CASE tools can be broadly divided into the following parts based on their use
at a particular SDLC stage:
Central Repository –
Is a central place of storage where a product specification, requirement
documents, related reports and diagrams, other useful information
regarding management is stored.
Central repository also serves as data dictionary.
Types of CASE tools
Classic CASE tools - established software development support tools (e.g.
interactive debuggers, compilers, etc.)
Real CASE tools - can be separated into three different categories, depending
on where in the development process they are most involved in:
• Upper - support analysis and design phases
• Lower - support coding phase
• Integrated - also known as I-CASE support analysis, design and coding phases
Upper and lower CASE tools are named as such because of where the phases they
support are in the Waterfall Model (see below)
Why we use CASE tools?
CASE tools offer:
Savings in resources required for software development - with less
Quicker development phase (i.e. shorter time to market)
Reduction of generation of defects
Easier identification of defects during development
Savings in maintenance resources required
Greater standardization of software systems and therefore increased reuse
possibilities
5. Use of White Space:
Proper use of white space (empty space between content) is vital for readability. It helps
users focus on the text without feeling overwhelmed by a cluttered page.
6. Visual Hierarchy:
Highlight important elements with contrast (bold text, larger fonts, or colors) but avoid
overuse of these techniques. Ensure that key messages stand out but the overall design
remains balanced.
7. Optimized Images and Media:
Ensure images are not only optimized for fast loading but also formatted correctly within
the text. Align them properly and consider responsive design to ensure they adapt to
various screen sizes.
8. Mobile-Friendly Formatting:
Ensure that your content formats properly across various devices (mobile, tablet, desktop).
Responsive design ensures text, images, and elements scale appropriately on different
screen sizes.
9. SEO-Friendly Content:
Use keywords effectively in headings, subheadings, and throughout the content without
overstuffing.
Ensure that the content remains natural and readable for both users and search engines.
3.4. Adjustment of architecture based on
feedback
Feedback is thus a systemized learning process which fills gaps in existing
knowledge besides updating it.
The development process may contain several sign off points where you will be
expected to approve changes, before the designer can continue the process.
A.Sign-off Sheet Indispensability
Sign-off sheets are vital in the creative process, serving as a record of
agreements, project progress, and final approval.
They ensure alignment among the project team and client regarding the project
concept, deliverables, and timeline.
Prototype Overview:
The prototype presented represents the information architecture and content structure for the "LearnWebDev" website aimed at providing web
development education resources.
Prototype Components Reviewed:
Information Architecture: Navigation structure, main sections, and content hierarchy.
Content Details: Home page, courses, tutorials, resources, community, about us, and additional sections.
User Interface Elements: Basic wireframes/mockups outlining layout and content placement.
Stakeholder Sign-off:
We, the undersigned, have reviewed and hereby approve the information architecture prototype for the "LearnWebDev" website:
1. [Stakeholder Name 1]: _______________________ (Signature & Date)
2. [Stakeholder Name 2]: _______________________ (Signature & Date)
This sign-off sheet signifies the agreement and approval of stakeholders regarding the
information architecture prototype for the "LearnWebDev" website. All parties involved are in
consensus to proceed with the development phase based on this prototype.
[Footer: Company/Project Logo & Contact Information
! !
N D
E
H E
T
Thank YOU!!