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 input program Produce software documentation
Course Assessment Test
Test #1 - 10% Test #2 – 10% Test #3 – 10%
Group Assig 15%
End Module Test 30%
Attitude 10%
Individual Assig.
Assig. #1 - 5% Assig. #2 - 5% Assig. #3 - 5%
Life Cycle of Software Development
Analysis
Design
Maintenance
CodingImplementation
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 ing 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 6.Acquire peripherals 7.Construct the system 8.Deliver the system
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
SDLC in Software Development System Analysis Survey Study Definition Selection
Sys. Implementation Construction Deliver
System Design Acquisition Design
System Maintain & Improve
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 Dec.
Online Storage
Process
Document
I/O
Termination
Manual Input
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.