Docsity

Steps in Program Development, Schemes and Mind Maps of Information Technology

Partial preview of the text

Download Steps in Program Development and more Schemes and Mind Maps Information Technology in PDF only on Docsity!

Programming

Steps in program

development

Chapter 2

Steps in Program Development

  • The various steps involved are
    • Defining or Analyzing the problem
    • Design (Algorithm)
    • Coding
    • Documenting the program
    • Compiling and running the program
    • Testing and Debugging
    • Maintenance

Unit 1 - Programming / Lecture 1 - Introduction 2

Tasks in defining a problem

  • Followings are the tasks in order to define a problem - Specifying the input requirements - Specifying the output requirements - Specifying the processing requirements

Specifying the input requirements

  • The input specification is obtained by answering following questions
    • What specific values will be provided as input to the program?
    • What format will the values be?
    • For each input item, what is the valid range of values that it may assume?
    • What restrictions are placed on the use of these values?

Specifying the processing requirements

  • The processing requirement is obtained by answering following questions - What is the method (technique) required in producing the desired output? - What are the validation checks that need to be applied to the input data? - What calculations are needed?

Activity 1: Find Factorial Number

  • Input?
  • Output?
  • Process?

Activity 1: Find Factorial Number

  • Input : Positive integer number
  • Output : Factorial of that number
  • Process : Solution technique which transforms input to output. Factorial of a number can be calculated by the formula n!=123…n

Activity 2: Sum of numbers from 1 to n

  • Input : Positive integer number
  • Output : Sum of numbers from 1 to n
  • Process : 2 methods

Method A: You can add them up. It might take a while, depending on what N is, but let’s practice with N = 7. 1+2+3+4+5+6+7 = 28.

Method B: You can look into a general case to try to find a formula:

Main elements of use-case diagram

Activity: Draw use-case diagram

You are hired to develop FAI’s library system with following description

  • Admin who could
    • Manage books, readers (staff, lecturers, and students), etc.
    • Manage borrow/return books
  • Users (staff, lecturers, students) who could
    • View/search books
    • Reserve books
    • Borrow/return books

Please draw Use-case diagram for this scenario

Modular Design

  • Once the problem is defined clearly, several design methodologies can be applied
  • An important approach is Top-Down program design
  • It is structured design technique
    • It breaks up the problem into a set of sub-problems called Modules
    • It creates a hierarchical structure of the modules

STEPS IN Program Development: Coding

  • An algorithm expressed in programming languages is called Program
  • Writing a program is called Coding
  • The logic that has been developed in the algorithm is used to write program

Forms of documentation

  • Documentation comes in two forms
    • External documentation, which includes things such as reference manuals, algorithm descriptions, flowcharts, and project workbooks
    • Internal documentation, which is part of the source code itself (essentially, the declarations, statements, and comments)

Compiling and Executing the Program

  • Compilation is a process of translating a source program into machine understandable form
  • The compiler is system software
    • It examines each instruction for its correctness
    • It does the translation
  • During the execution
    • Program is loaded into the computer’s memory
    • The program instructions are executed