Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

SESSION PLAN

Sector

INFORMATION AND COMMUNICATION TECHNOLOGY

Qualification Title

PROGRAMMING NC IV

Unit of Competency

Design Program Logic

Module Title

Designing Program Logic

Learning Outcomes:
1. Select the program logic design approach
2. Document the program logic or design
3. Validate the design
A. INTRODUCTION: This module defines the competency required to describe the various processes in a program to
ensure that there is understanding of user and design requirements.
B. LEARNING ACTIVITIES
LO1 Select the program logic design approach
Learning Content

Methods

Presentation

College for Research


and Technology

PROGRAMMING NC IV

Practice

Feedback

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 1

Resources

Time

The
program
design and
structure

Lecture/
Demonstratio
n

Read
Information Perform
Sheet 1.1-1 of the Self-check
Program design and 1.1-1
structure

Check
Answer
Answer
1.1-1

your Information
54Hr
to Sheet
with s
key answer key

C. ASSESSMENT PLAN

Written / Oral Examination


Observation
Practical Demonstration
Case Study (Defense)

D. TEACHERS SELF-REFLECTION OF THE SESSION

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 2

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 3

INFORMATION SHEET 1.1-1


Learning Objective:

After reading this INFORMATION SHEET, YOU MUST be able to


identify the program design and structure.

INTRODUCTION
The programming process is similar in approach and creativity to
writing a paper. In composition, you are writing to express ideas; in
programming you are expressing a computation. Both the programmer and
the writer must adhere to the syntactic rules (grammar) of a particular
language. In prose, the fundamentalidea-expressing unit is the sentence; in
programming, two units statements and comments are available. Standing
back, composition from technical prose to fiction should be organized
broadly, usually through anoutline.
The outline should be expanded as the detail is elaborated, and the
whole reexaminedand re-organized when structural or creative flaws arise.
Once the outline settles, you begin the actual composition process, using
sentences to weave the fabric your outline expresses. Clarity in writing
occurs when your sentences, both internally and globally, communicate the
outline succinctly and clearly. We stress this approach here, with the aim of
developing a programming style that produces efficient programs that
humans can easily understand.
Fundamentals of Program Design
Every computer program is built from components, data, and control.
For a single-user application (used by one person at a time), which
normally reads data, saves it in a data structure, computes on the data,

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 4

and writes the results, there is a standard way of organizing the component
structure, data structure, and control structure:
1. First, design the program's component structure with three
components, organized in a model-view-controller pattern.
2. Next, decide what form of data structure (array, table, set, list, tree,
etc.) will hold the program's data. The data structure will be inserted
in the program's model component.
3. Then, write the algorithm that defines the execution steps --the control structure. The algorithm will be placed inside the
program's controller.
4. Determine the form of input and output (disk file, typed text in a
command window, dialogs, a graphical-use interface, etc.) that the
program uses.
Systems development, in simplest terms, is a six-stage process or life cycle
(SDLC) that consists of phases, which often overlap and typically may
include:
1. conducting a preliminary investigation;
2. then analyzing the system;
3. designing and
4. developing the system before
5. implementation, and finally
6. providing systems maintenance, including updating and upgrading,
with the possibility of beginning the process all over again
So, in order to design a program, there are essentially two steps that involve
determining:
1. the program logic and

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 5

2. then its detail.


In todays world of programming and in the first step (i.e., determining
the program logic), a structure or hierarchy chart is utilized to determine
program logic. As the term, hierarchy, suggests, it is a top-down design or
approach and within the hierarchy are modules or processing steps in the
program which attempt to identify all elements and relationships among the
elements or modules that maybe required to achieve the programs purpose.
This latter modularization concept breaks each operation into
smaller, more manageable and often less complex, single functions that
enables separation of development and testing activities (Williams & Sawyer,
pp. 507-508). Williams & Sawyer have provided a list of considerations or
rules that should be kept in mind in determining the modularization, such
as keeping each module to a manageable size; each with a single function
independent of the others; making sure input and output functions are
clearly defined in separate modules; with single entry and exit points; and
making sure control is returned to the point from which is was called by
a first module.
Data structure
When you solve a problem with a computer program, always ask first,
How should the program store the information upon which it
computes?
Sometimes people talk about ``modelling'' the problem within the computer;
the way the data is held is called the model. Recall the previous examples:

If the program is a spreadsheet program, then the information should


be held in a data structure that is a grid.

If the program is a bank-account database, then the information


should be grouped into customer accounts, each with a unique ID,
saved in an array or set.

If the program is a file-system manager, then the information are files


and folders that are organized in a tree-like structure.

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 6

Three Control Structures


The control structures are divided in three groups:
1. sequence control structure
2. selection control structure
3. iteration control structure
The sequential control structure is the most important structure. Its
purpose is to execute actions in sequence ( one after another). In all
structures of control can be utilized logic operations like (or, and, not) or
relations ( =, <, >, <=.=>,< >)
The selection control structure allows the algorithm make decisions or
select. The process is executed or omitted according to the fulfillment of the
condition or several conditions. A condition is an expression that gives back
a true or false value so that the algorithm makes the decision.
Structure-If: It is specified by a condition or also known as logical
expression, which can be true or false. The algorithm always takes one from
both ways.
Structure-Case: It is used for the resolution of situations which the
number of alternatives is greater than two. According to the value of the
expression, can be take different X values, and only one can be executed.
In the iteration control structure is necessary to execute several times and
instruction or and instruction set in order to solve some problems. In some
cases the number of repetitions is known, but in others the repetition
depends on calculation of variables that occur within the resolution of the
problem.

Do Until

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 7

In this structure is fulfilled the condition and is evaluated after each


execution.Therefore, the condition is executed at least once and it is
repeated as long as the condition remains false. There is known interactions
but always they are greater than 0.

Do while
This structure is opposite to Do until structure. The actions are repeated
while the condition remains true. If the condition is false, the execution
cannot be generate or the execution of the action stop the production.

College for Research


and Technology

PROGRAMMING NC IV

Date Developed:
December 2016
Date Revised:
Developer
DJ Clark Mariano
Aris Joepher O. Santarina
Megan Parena

Document No.

Page 8

You might also like