Date post: | 27-Apr-2015 |
Category: |
Documents |
Upload: | cherreralover |
View: | 465 times |
Download: | 3 times |
SPG 0412 Programming in C
En Ainul Hazmin Bin A.Hamid
TTO, Industrial ElectronicsGerman Malaysian Institute
ObjectivesUpon 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 AssessmentTestTest #1 - 10% Test #2 – 10%Test #3 – 10%
Individual Assig.Assig. #1 - 5% Assig. #2 - 5% Assig. #3 - 5%
End Module Test30%
Attitude10%
Group Assig15%
Life Cycle of Software Development
Analysis Design
MaintenanceCoding-
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
SDLCPhase
1.Survey scope & feasibility
2.Study current system
3.Define requirements
4.Select a feasible solution
Outcome - Output
Feasibility assessment
Problem statement
Requirement statement
Approved system proposal (TOE)
SDLC (continued..)
Phase
5.Design new system
6.Acquire peripherals
7.Construct the system
8.Deliver the system
Outcome - Output
Design specification
Proposal of configuration
A functioning system
Commissioning
SDLC (continued..)
Phase
9.Maintain and improve the system
Outcome - Output
A reliable, effective 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
System AnalysisSurvey
Study
Definition
Selection
System DesignAcquisition
Design
Sys. ImplementationConstruction
Deliver
System SupportMaintain & Improve
SDLC in Software Development
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
FlowchartsFlowcharts
SystemSystem ProgramProgram
System Documentation Models
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
Online Storage
Dec.
Document
Process I/O Termination
ManualInput
Manual Op.
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
Dec.Process I/O
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.