Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
simple problems
References:
Programming in ANSI C E-balaguruswamy
ANSI C programming Language Dennis M Richie
Internet web sites are useful
vinayan Ap in IT
Learning outcomes
1.understand characteristics associated with flow
charts and pseudo code
2.understand role of step wise refinement in
developing algorithms
3.distinguish type of errors at the time of compilation
4.understand components of problem
solving,program design,algorithm development
5.understand type of errors produced by o/p
program
vinayan Ap in IT
Assesment plan
1.quiz
2.assignments(individual/group)
3.home works
4.match table
5.verify solution
vinayan Ap in IT
Introduction
vinayan Ap in IT
Problem solving
vinayan Ap in IT
Step3: design
Step 4:implementation
->write source code based on algorithm developed in
site
-> integrate newly generated code into existing code
Eg1. Ur friend follows steps and bake the cake as
directed.
Accumulation of different components help to make
dessert
Step-5 testing and verification
->make shure program works & produce correct
output(any hacking)
->if error goes to step 3
vinayan Ap it
in ITfrom oven
->Eg.once the cake is done ,remove
,sampling the crumbs inside the pan
Step6:Repeat step3-5
once ur code tested sufficently determine next piece
of solution implemented & repeat step3-5
Eg1. For the next item in our menu now repeat
previous steps .focussing ur energies to make punch
step7:Maintenance
->program need to be revised & enhanced over time
->keeping design document providing readable
source code makes productive less time consuming
Eg1.altering or experimenting some of the ingrediants
used in desert
vinayan Ap in IT
Flow chart
->problem: if test taker had a score above 90 excellent job if test taker
scores below 90 try little harder
->Termination -marks start & end of flow chart
->Process:activity associated with mapping of data
->Decision-illustriates flow solution based on true or a false condition
->input/output:show reading data or display result
Input/output
process
Decision
vinayan Ap in Termination
IT
Start
Display
enter score
Read
score
Display
excellent job
If score>90
Display
try little harder
vinayan Ap in IT
Exit
Pseudo code
Decision symbol
Design phase
termination
Requirement specification
Flow chart
sequential
Mapping of data
Desk checking
Procedural programming
implementation
Determine output
testing
True/false
process
Pseudo code
Develop algorithm
maintenance
vinayan Ap in IT
Problem statement:
your friend operates a business she asked you to create an algorithm
outline steps needed to calculate total kilometer expenses for her tax
return.this year IRS allows .585 rs for a kilometer for business related
travel.this will change every year,your solution should simply ask her for
that information .she would like to be able to enter amount of kilometers
she traveld for business & calculate total mileage expenses.
Develop pseudo solution?
Input type
data
source
Decimal
Km traveled
keyboard
Decimal
Km rate
keyboard
Requirement specification
Inputs
output
Output type
data
destination
Decimal
Km traveled
screen
Decimal
Km rate
screen
Decimal
Km expense vinayan
screen
Ap in IT
allowense
Design
Required formulas:
kmExpenseAllowance=km
traveled *km rate
Pseudocode:
--input phase---
Testing verification
Desk checking:
read km traveled
read km traveled
--process phase--
---Validation correct---
kmexpenseallowance=kmtraveled
*kmrate
---Validation--
vinayan Ap in IT
Assignment 1(individual)
vinayan Ap in IT
Assignment 2(Group)
vinayan Ap in IT
Assignment 3(individual):
Syntax error
->found during compilation process
->if severity is less compiler give warning
->caused by incorrect in mecanics of statements
Linker error
->encountered during build process
->linkers job to build executable from object code
->no tools allow you to jump to the line that caused error
->Link error must be corrected before execution of program
Run-Time-Error
->if a program terminates/crashes during execution then you have run time error
->error may be dividing zero/accessing outside memory
->debugger is set of tools help programmer to locate bugs
Logic error
->most difficult error
->stepwise refinement helps by confining logic error to localized area
->debugger is crucial tool helping locate logic error
vinayan Ap in IT
vinayan Ap in IT
Assignment 5(Group)
vinayan Ap in IT