You are on page 1of 25

SPG 0412

Programming in C
En Ainul Hazmin Bin
A.Hamid
TTO, Industrial Electronics
German Malaysian Institute
Objectives
Upon completion of SPG 0412, the students
should be able to:
Develop programs in C language using
structured programming techniques

Identify process sequences involved when


developing user input program

Produce software documentation


Course Assessment
Test  Group Assig
Test #1 - 10% 15%
Test #2 – 10%
Test #3 – 10%  End Module Test
30%
Individual Assig.
Assig. #1 - 5%  Attitude
Assig. #2 - 5%
10%
Assig. #3 - 5%
Life Cycle of Software
Development

Analysis Design

Coding-
Maintenance Implementation
What is a System?
A set of things or processes that are linked
together by rules to form a unified
process.
A system has boundaries & interacts with
the universe beyond the boundary, by
passing data across the boundary.
Life Cycle of System
Development (SDLC)
As a disciplined approach to developing
info.system
To document project phases, inputs and
outputs, boundaries (people /
organization).
An overall look of SDLC
SDLC
Phase Outcome - Output
1.Survey scope & Feasibility
feasibility assessment
2.Study current Problem statement
system
3.Define requirements Requirement
4.Select a feasible statement
solution Approved system
proposal (TOE)
SDLC (continued..)
Phase Outcome - Output

5.Design new system Design specification


6.Acquire peripherals
7.Construct the Proposal of
system configuration
8.Deliver the system A functioning system

Commissioning
SDLC (continued..)

Phase Outcome - Output


9.Maintain and A reliable, effective
improve the system system
SDLC – An example
SDLC can be implemented in any real life
situation, without restricting to
programming-based application.
Observe the House-Building Example
SDLC - Gantt Chart
The phases discussed earlier are not
really sequential, and they might be
overlapped.
Gantt Chart
SDLC – Group Exercise
Construct a SDLC methodology to:
buy a brand new car
automated ticket parking system
book rental system for your former secondary
school
security system for a shopping mall
Internet lab for GMI students
SDLC in Software Development
System Analysis System Design
Survey Acquisition
Study Design
Definition
Selection

Sys. Implementation System Support


Construction Maintain & Improve
Deliver
System Documentation Models
 Models
 Abstraction / representation of reality

 The simplification of the real thing

 Are built as a design technique

 Why do we need models?


 Procedures for personnel to follow

 Analyze and document the system

 To convert data into information.


System Documentation Models
Data Flow Diagram (DFD)
a model that describes the flows of data & the
process that change/transform data throughout the
system
DFD properties:
System Documentation Models
Flowcharts graphically illustrate how input,
processes and output interact with each other

Flowcharts

System Program
System Flowchart

The general model of the whole


system’s application.
As a physical summarization of all the
input & output involved.
Example of System Flowchart.
System Flowchart - Symbols

Process I/O
Dec. Termination

Online Document Manual Op.


Manual
Storage
Input

Offline
Program Flowchart
A program flowchart models the program
logic, in sequence.
A guide by programmers to code the
program, as well as for documentation.
Illustrates flow of data and how they are
processed.
Program Flowchart - Symbols

Process I/O
Dec.

Begin/Termination
Program Flowchart - Exercise

Create a program flowchart to:

buy a KOMUTER ticket from the ticketing


mach.
Program Flowchart - Exercise

Create a program flowchart to:

Show how two numbers are to be input thru the


keyboard. If the first number is greater than the
second then multiply both numbers, otherwise
divide them.
Structured Programming
A well-structured program includes various
combinations of 3 restricted control structures,
and exhibits a single-entry & single-exit property.
The 3 restricted control structures are:
A sequence of instructions
A selection of instructions based on certain criteria
An iteration (repetition) of instructions based on
certain criteria
Introduction C language & Turbo
C++ Compiler

Invented by Dennis Ritchie in 1970s.


Flexible & powerful, to create software
products., but then it reached its limits.
Turbo C/C++ provides integrated
programming features for programmers to
carry out programming tasks.

You might also like