Systems Analysis and Design Bachelor of Information Technology External Degree Programme by Kapila D - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

Systems Analysis and Design Bachelor of Information Technology External Degree Programme by Kapila D

Description:

First two sets of Quizzes 17-Nov-03. Assignment 1 ... In early 60s, program designers stressed the importance of modular ... Emerging major ... – PowerPoint PPT presentation

Number of Views:122
Avg rating:3.0/5.0
Slides: 57
Provided by: gkad
Category:

less

Transcript and Presenter's Notes

Title: Systems Analysis and Design Bachelor of Information Technology External Degree Programme by Kapila D


1
Program Design
Fundamentals of Programming IT1202
2
Learning Management System (LMS)
  • Submission Deadlines
  • First two sets of Quizzes 17-Nov-03
  • Assignment 1 (Individual) 01-Dec-03
  • Assignment 1 (Group) 15-Dec-03
  • Second two sets of Quizzes 29-Dec-03
  • Assignment 2 (Individual) 12-Jan-04
  • Assignment 2 (Group) 26-Jan-04
  • Seminar Questions 09-Feb-04

3
An overview of program design
  • Importance of professional programming
  • In most cases , used for large and complex
    systems
  • Maintained by people other than the original
    author
  • Last for many years and continually enhanced and
    amended to meet the changing environment

4
Evolution of Program Design
  • Programming as an Art Form
  • Some forty years ago , the main preoccupation was
    with the correctness of the solution
  • The design tool that emerged from this period was
    the flowchart
  • Main concern was with logic flow

5
Evolution of Program Design..
  • Modular Programming
  • In early 60s, program designers stressed the
    importance of modular programming
  • This was a process of top-down decomposition
  • Main concern was with the structure of the
    program as well as the logic flow

6
Evolution of Program Design
  • Structured Programming
  • In 1966 Bohm and Jacopini demonstrated that
    any program can be constructed using three
    constructs
  • Sequence
  • Selection
  • Iteration

7
Evolution of Program Design
  • Object-Oriented Programming (OOP)
  • Emerging major programming paradigm
  • Main concern is an Object which is a
    particular instance of a class which consist of
  • Data
  • Methods

8
Main components of a Program
  • Program Data Algorithm
  • Data Basic Facts such as Name, Date of Birth,
    Telephone Number, Address which we process
    through a program
  • An algorithm is an effective procedure for
    solving a problem in a finite number of steps

9
Important Features of Data
  • Data Names
  • Implicit Explicit Data
  • Data Types
  • Usage of Data
  • Data Structures
  • Scope of Data

10
Important Features of Data.
  • Data Names
  • All programming languages have rules when giving
    names to data items
  • No of characters to be used
  • Type of characters to be used
  • e.g. we can give alphabetic characters ,
    , etc.
  • Whether they are case sensitive
  • Whether the characters used imply any special
    characteristics

11
Important Features of Data
  • Explicit vs. implicit definition of data
  • Total Total Counter

12
Important Features of Data..
  • Data types
  • Numeric data
  • Integers Eg. 3
  • Real Numbers - Eg. 5.5
  • Character data - Eg. x
  • Boolean data Eg. Yes or no
  • Data usage
  • Variables can be changed
  • Constants can not be changed

13
Important Features of Data..
  • Data structures
  • Single items
  • (No contained sub-items)
  • e.g.
  • total , counter

14
Important Features of Data
  • Data structures
  • Structured items (group items)
  • Has a number of sub-parts
  • eg a persons name contain a given name a
    family name
  • Classified under two types
  • A record
  • An array

15
Important Features of Data .
  • A record
  • A structure in which each part has an identifying
    name
  • Data contained in each part of the record may be
    accessed by referring to that name
  • eg define StudentRecord as
  • IdNumber integer
  • Name string
  • Address string
  • DateOf Birth string
  • FeePayable real
  • end define

16
Important Features of Data
  • An array
  • Consist of sub components which has the same name
    and are accessed by giving their position within
    the array
  • The sub components are normally required to be
    all of the same type size.
  • e.g. DailyRainfall(365) real
  • This array consist of 365 real numbers

17
Important Features of Data..
  • Data scope
  • Global
  • Accessible by a number of procedures/functions
  • Defined within an outer procedure may then be
    shared by the inner procedures
  • The ability for a number of procedures to share
    global data removes the need to pass the data
    from one procedure to another
  • However there is a possibility to corrupt the
    data by sharing global data
  • Should be used warily within a program

18
Important Features of Data
  • Local
  • Defined within a procedure for access by that
    procedure only
  • Keep data private within any procedure and avoid
    possible corruption by other procedures
  • Enable a procedure to be encapsulated
  • It is possible for a number of procedures to have
    a variable having the same name

19
  • Simple procedures/functions
  • A program is a series of procedures/functions
  • designed to process data
  • produce a result according to a problem
    specification

Proc One
Proc two
Proc n
Program
20
An example of an algorithm for making a pot of tea
  • If the kettle does not contain water then fill
    the kettle
  • Plug the kettle into the power point and switch
    it on
  • If the tea pot is not empty then empty the teapot
  • Place tea leaves in the teapot
  • Check whether water is boiling in the kettle
  • If the water in the kettle is not boiling then go
    to step 5
  • Switch off the kettle
  • Pour water from the kettle into the teapot

21
An example of an algorithm for making a pot of
tea.
  • If the kettle does not contain water then fill
    the kettle
  • Plug the kettle into the power point and switch
    it on
  • If the tea pot is not empty then empty the teapot
  • Place tea leaves in the teapot
  • Check whether water is boiling in the kettle
  • If the water in the kettle is not boiling then go
    to step 5
  • Switch the kettle off
  • Pour water from the kettle into the teapot

Sequence
22
An example of an algorithm for making a pot of
tea.
  • If the kettle does not contain water then fill
    the kettle
  • Plug the kettle into the power point and switch
    it on.
  • If the tea pot is not empty then empty the teapot
  • Place tea leaves in the teapot
  • Check whether water is boiling in the kettle
  • If the water in the kettle is not boiling then go
    to step 5
  • Switch the kettle off
  • Pour water from the kettle into the teapot

Selection
23
An example of an algorithm for making a pot of
tea.
  • If the kettle does not contain water then fill
    the kettle
  • Plug the kettle into the power point and switch
    it on.
  • If the tea pot is not empty then empty the teapot
  • Place tea leaves in the teapot
  • Check whether water is boiling in the kettle
  • If the water in the kettle is not boiling then go
    to step 5
  • Switch the kettle off
  • Pour water from the kettle into the teapot

Repetition
24
What is a computer program
  • The computer scientist Niklaus Wirth
  • stated that
  • Program Data Algorithm
  • We can say
  • sequence of instructions which the CPU
    interprets as arithmetical and logical operations

25
Tools for Algorithm Design
26
A good design tool will lead to programs which
are
  • Concise
  • Capable of machine execution
  • Accurate in their operation
  • Easy to amend and enhance over a long period of
    time
  • Must promote elegance in the solution
  • Unambiguous

27
Different Tools available
  • Flowcharts
  • Nassi-shneiderman (NS) Diagrams
  • Pseudocode

28
What is a flow chart
  • Diagrammatic representation of the algorithm
  • Many symbols are included in its notation

29
Notations for flow charts
  • Process or operation

30
Notations for flow charts.
  • Decision

31
Notations for flow charts.
  • Terminator

32
Notations for flow charts
  • Flow of logic

33
What is NS diagram
  • Use to illustrate the flow of logic of a problem
  • Use different pictures to represent the logic of
    a program

34
What is a NS diagram..
  • The flow of logic is indicated by joining the
    symbols together
  • Steps are executed from top to bottom
  • No arrows are used to indicate the flow

35
Notations for NS diagrams
  • Process

36
Notations for NS diagrams..
  • Decision

37
Notations for NS diagrams..
  • Iteration

38
Notations for NS diagrams..
  • A called sub-procedure

39
What is Pseudocode
  • Text based tool rather than a diagrammatic one
  • Some times called Structured English
  • Algorithm is specified with the same precision as
    that of the programming language to be used
  • There is no universal pseudocode

40
Key words used in Pseudocode
  • global
  • Global data
  • local
  • Local data
  • input
  • Data to be entered through the Key board
  • display
  • Screen output

41
Key words used in Pseudocode
  • Comments
  • E.g. This is a comment
  • stop
  • Termination of execution
  • Assignment of value

42
Key words used in Pseudocode
  • Arithmetic operators
  • exponentiate
  • multiply
  • add
  • / divide
  • - subtract
  • () to vary the order of precedence

43
Sequence controls used in Pseudocode
  • Selection

if condition(s) then statement(s) else
statement(s) end if
44
Sequence controls used in Pseudocode
  • Multiple selection

Case of data-name value statement(s)
else statements(s) end case
45
Sequence controls used in Pseudocode
  • Leading test loop ( repetition)

while condition(s) statement(s) end while
46
Sequence controls used in Pseudocode
  • Trailing test loop ( repetition)

repeat statement(s) until condition(s) end
repeat
47
Algorithm specification
  • Now lets take one problem and try to
    illustrate with different tools discussed

48
Problem One
Pseudocode
  • if mark gt 75 then
  • display D
  • else
  • if mark gt 60 then
  • display C
  • else
  • if mark gt 40 then
  • display S
  • else
  • display F
  • end if
  • end if
  • end if

This is an example of a nested if condition
49
Problem One
NS diagram
mark gt 75
Y
N
mark gt 60
Y
N
Display D
Y
N
mark gt 40
Display C
Display S
Display F
50
Problem One
Flow charts
markgt75
YES
NO
display D
markgt60
NO
YES
display C
NO
mark gt 40
YES
display S
display F
51
Problem Two
Pseudocode
  • X 0
  • while X lt 10
  • display X
  • X X 1
  • end while

52
Problem Two
NS Diagram
53
Problem Two
Flow Charts
X 0
FALSE
Is X lt 10?
TRUE
X x 1
Display X
54
  • Comparison of certain features of Design Tools

55
Some Useful URLs
  • Importance of professional programming
  • http//www.overthenet.com/programming.html
  • Tools for program Design
  • http//mime1.gtri.gatech.edu/MM_Tools/design.html
  • Evolution of software design
  • http//homepages.feis.herts.ac.uk/nehaniv/al7ev/n
    ehaniv-intro/node9.html
  • Tools for algorithm specification comparison
    between them
  • http//www.gcseguide.co.uk/flow_charts.htm
  • Describes about flow charts
  • http//dragon.herts.ac.uk/study/modules/mele0006/s
    trucds2.htm
  • Data names
  • http//java.sun.com/docs/books/tutorial/java/nutsa
    ndbolts/variables.html

56
Some Useful URLs
  • Data names
  • http//java.sun.com/docs/books/tutorial/java/nutsa
    ndbolts/variables.html
  • Explicit vs. implicit definition of data
  • http//www.zvon.org/tmRFC/RFC971/Output/chapter3.h
    tml
  • Data types data usage
  • http//java.sun.com/docs/books/tutorial/java/nutsa
    ndbolts/datatypes.html
  • Describe the data types
  • http//www.rational.com/centers/data_usage/index.j
    sp?SMSESSIONNO
  • Data structures
  •  http//www.cs.sunysb.edu/skiena/214/lectures/lec
    t1/lect1.html
Write a Comment
User Comments (0)
About PowerShow.com