0% found this document useful (0 votes)
3 views65 pages

Program Development

The document outlines the fundamentals of information technology, focusing on program development and programming languages. It covers various programming paradigms, the program development life cycle (PDLC), and tools for effective program design and debugging. Additionally, it discusses the characteristics of different programming languages and their applications in software development.

Uploaded by

adeel4704452
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
3 views65 pages

Program Development

The document outlines the fundamentals of information technology, focusing on program development and programming languages. It covers various programming paradigms, the program development life cycle (PDLC), and tools for effective program design and debugging. Additionally, it discusses the characteristics of different programming languages and their applications in software development.

Uploaded by

adeel4704452
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 65

CT-174

Fundamentals of
Information
Technology

Lecture
Program Development and
Programming Languages
Learning Objectives

1. Understand the differences between structured


programming, object-oriented programming (OOP), aspect-
oriented programming (AOP), and adaptive software
development.
2. Identify and describe the activities involved in the program
development life cycle (PDLC).
3. Understand what constitutes good program design and list
several tools that can be used by computer professionals
when designing a program.
4. Explain the three basic control structures and how they can
be used to control program flow during execution.
Learning Objectives

4. Discuss some of the activities involved with debugging a


program and otherwise ensuring it is designed and written
properly.
5. List some tools that can be used to speed up or otherwise
facilitate the program development process.
6. Describe several programming languages in use today and
explain their key features.
Overview

• This chapter covers:


– The most common approaches to program design and
development
– The phases of the program development life cycle (PDLC)
– Tools that can be used to design and develop a program
– Good program design techniques and types of program
errors
– Common programming languages
Programs & Programming

 Computer program –
 a sequence of instructions for a computer written to
perform a specific task
 Programming: Process of designing, writing, testing, debugging
& maintaining the source code of computer programs
 Programs need to be designed before they can be
developed
 Procedural design
 Object oriented design
 Aspect oriented design
 Adaptive design
 Programs use computer memory to save pieces of information
for later use (variables)
Approaches to Design and
Development
• Procedural Programming
– An approach to program design in which a program is
separated into small modules that are called by the main
program or another module when needed
• Procedure call—locating specific tasks in procedures
(modules or subprograms) that are called by the main
program when needed
• Allows each procedure to be performed as many times
as needed; multiple copies of code not needed
• Prior to procedural programming, programs were one
large set of instructions (used GOTO statements)
Approaches to Design and
Development
• Structured Programming
– Goes even further, breaking the program into small
modules (Top-down design)
– Variables
• Named memory locations that are defined for a
program
• Used to store the current value of data items used in
the program
Approaches to Design and
Development
Approaches to Design and
Development
• Object-Oriented Programming (OOP)
– Programs consist of a collection of objects that contain
data and methods to be used with that data
• Class
– Group of objects that share some common
properties
• Instance
– An individual object in a class
• Attributes
– Data about the state of an object
• Methods
– Perform actions on an object
• Objects can perform nontraditional actions and be easily
used by more than one program
Approaches to Design and
Development
Approaches to Design and
Development
• Aspect-oriented programming (AOP):
– Separates functions so program components can be
developed and modified individually from one another
• The components can be easily reused with separate
nonrelated objects
Approaches to Design and
Development
• Adaptive software development:
– Designed to make program development faster and more
efficient and focus on adapting the program as it is being
written
• Iterative and/or incremental
• Includes RAD (rapid application development) and extreme
programming (XP)
– Agile software development
• Goal is to create software rapidly
• Focuses on building small functional program pieces during
the project
• Includes earlier adaptive software approaches such as RAD
(rapid application development) and extreme programming
(XP)
The Program Development
Life Cycle (PDLC)
• Program Development
(application software
development)
– The process of
creating application
programs
• Program Development
Life Cycle (PDLC)
– The five phases of
program
development
The Program Development
Life Cycle (PDLC)
• Problem Analysis
– The problem is considered and the program specifications
are developed
• Specifications developed during the PDLC are reviewed
by the systems analyst and the programmer (the
person who will code the program)
– Goal
• Understand the functions the software must perform
– Documentation: Program Specifications
• Result of the first phase of the PDLC outlining what the
program must do
The Program Development
Life Cycle (PDLC)
• Program Design
– The program specifications are expanded into a complete
design of the new program
• Algorithm for the program is developed
• Careful planning and design of a computer program are
extremely important
– Program Design Tools
• Planning tools that include diagrams, charts, tables, and
models
• Structure Charts (hierarchy charts)
– Depict the overall organization of a program
The Program Development
Life Cycle (PDLC)
• Flowcharts
– Show graphically, step-by-step, how a computer
program will process data
– Use special symbols and relational operators
– Can be drawn by hand or with flowcharting
software
• Pseudocode
– Uses English-like statements to outline the logic of a
program rather than the flowchart’s graphical
symbols
The Program Development
Life Cycle (PDLC)
The Program Development
Life Cycle (PDLC)
The Program Development
Life Cycle (PDLC)
• Unified Modeling
Language (UML)
Models
– Set of standard
notations for
creating business
models
– Widely used in
object-oriented
programs
– Includes class
diagrams and case
diagrams
The Program Development
Life Cycle (PDLC)
– Control Structures
• A pattern for controlling
the flow of logic in a
computer program,
module, or method
• The Sequence Control
Structure
– Series of statements
that follow one
another
The Program Development
Life Cycle (PDLC)
• The Selection Control Structure
– Multiple paths, direction depends on result of a
certain condition
» If-then-else
– Case control structure
» Allows for as many possible results of the
specified condition as needed
• Repetition Control Structure (iteration control structure)
– Repeat series of steps
» Do-while
» Do-until
The Program Development
Life Cycle (PDLC)
The Program Development
Life Cycle (PDLC)
– Good Program Design
• Is essential
• Saves time
• Good Program Design Principles
– Be Specific
» All things the program must do or consider must
be specified
– Follow the One-Entry-Point/One-Exit-Point Rule
– No Infinite Loops or Logic Errors
» Infinite loop is a series of steps that repeat
forever
Good Program Design
The Program Development
Life Cycle (PDLC)
– Program Design Testing
• Design should be tested to ensure logic is correct
– Desk check
– Tracing tables
– Documentation: Design Specifications
• Illustrates the program needed to fulfill the program
requirements
• Expressed using structure charts, flowcharts,
pseudocode, and UML models
• Include any test data and results from desk checking
Program Design Testing
Program Design Testing
The Program Development
Life Cycle (PDLC)
• Program Coding
– The program code is written using a programming
language
– Choosing a Programming Language
• Suitability to the application
• Integration with other programs
• Standards for the company
• Programmer availability
• Portability if being run on multiple platforms
• Development speed
The Program Development
Life Cycle (PDLC)
– The Coding Process
• Coding Standards
– Rules designed to standardize programming
– Makes programs more readable and easier to
maintain
– Includes the proper use of comments to:
» Identify the programmer and last
modification date
» Explain variables used in the program
» Identify the main parts of the program
The Program Development
Life Cycle (PDLC)
The Program Development
Life Cycle (PDLC)
– Reusable code
• Pretested, error-free code segments that can be
used over and over again with minor modifications
• Can greatly reduce development time
– Documentation: Documented Source Code
• Program coding phase results in the program written in
the desired programming language
• Should include enough comments (internal
documentation) so that the source code is easy to
understand and update
The Program Development
Life Cycle (PDLC)
• Program Debugging and Testing
– The process of ensuring a program is free of errors (bugs)
and works as it is supposed to
– Translating Coded Programs into Executable Code
• Coded programs need to be translated from source
code written by the programmer to object code the
computer can execute
• Converted using a language translator
– Program that converts source code to machine
language
The Program Development
Life Cycle (PDLC)
– Compilers
» Language translator that converts an entire
program into machine language before
executing it
» Designed for specific programming languages
such as Java or Python
– Interpreters
» Translates one line of code at one time
– Assemblers
» Convert assembly language programs into
machine language
The Program Development
Life Cycle (PDLC)
The Program Development
Life Cycle (PDLC)
– Preliminary Debugging
• Finds initial errors
• Compiler and Syntax Errors
– As programs are compiled or interpreted, errors occur
which prevent the program from running properly
− Syntax errors occur when the programmer has not
followed the rules of the programming language
• Run Time and Logic Errors
– Run time errors occur when the program is running
– Logic errors are errors in the logic of the program
» Program will run but produces incorrect results
» Dummy print statements can help locate logic errors
and other run time errors
Preliminary Debugging
Preliminary Debugging
The Program Development
Life Cycle (PDLC)
– Testing
• Occurs after the program appears to be correct to find
any additional errors
• Uses good test data—data that is very similar to the
actual data that will be used in the program
• Tests conditions that will occur when the program is
implemented
• Checks for coding omissions (i.e., product quantity
allowed to be < 0)
• Two stages
– Alpha test—internal on-site test
– Beta test—outside test
The Program Development
Life Cycle (PDLC)
– Documentation: Completed Program Package
• Copy of the test data, test results, finished program
code, and other documentation generated during the
testing phase should be added to the program package
– Developer documentation
– User documentation
The Program Development
Life Cycle (PDLC)
• Program Implementation and Maintenance
– Once the system containing the program is up and
running, the implementation process is complete
– Program maintenance
• Process of updating software so it continues to be
useful
• Very costly
– Documentation: Amended program package
• Program package should be updated to reflect new
problems or issues that occur and what changes to the
program were necessary
Quick Quiz

Which approach to programming uses the concept of


inheritance?
a. Procedural
b. Object-oriented
c. Aspect-oriented
2. True or False: An infinite loop is an example of a logic error.
3. A(n)______________________ is a program design tool that
shows graphically step-by-step the actions a computer
program will take.

Answers:
1) b; 2) True; 3) flowchart
Tools for Facilitating Program
Development
• Application Lifecycle Management (ALM) Tools
– Creating and managing an application during its entire
lifecycle, from design through retirement
– Tools include:
• Requirements management
– Keeping track of and managing the program
requirements as they are defined and then
modified
• Configuration management
– Keeping track of the progress of a program
development project
Tools for Facilitating Program
Development
• Application Generators
– Software program that helps programmers develop
software
– Macros
• Record and play back a series of keystrokes
• Programmers write them in a macro programming
language such as Visual Basic for Applications
– Report and Form Generators
• Tools that enable individuals to prepare reports and
forms quickly
Tools for Facilitating Program
Development
• Device Software Development Tools
– Assist with developing embedded software to be used on
devices, such as cars, ATM machines, and consumer
devices
• Software Development Kits (SDKs) and Application Program
Interfaces (APIs)
– Designed for a particular platform
– Enables programmers to develop applications more quickly
and easily
• Often released by hardware or software companies
– iOS SDK—allows third party developers to create
new applications for iPhone, iPad, iPod Touch
Tools for Facilitating Program
Development
• Application Program Interfaces (APIs)
– Help applications interface with a particular
operating system
• Often used in conjunction with Web sites
• Rich Internet Application (RIA) Tools
– Web-based applications that work like installed software
programs
– Desktop RIA can access local files and used without an
Internet connection
– Web-based RIAs are common
– Tools to develop RIAs
• Adobe AIR
Quick Quiz

1. Which of the following is not an Application Lifecycle


Management (ALM) tool?
a. Requirements definition software
b. Code generator
c. Application program interface (API)
2. True or False: A software development kit (SDK) is designed
for a particular platform and allows programmers to develop
applications quickly for that platform.
3. A(n) ______________________ is often used to create the
forms or input screens used to input data into a program or
database.
Answers:
1) c; 2) True; 3) form generator
Programming Languages

• What is a Programming Language?


– A set of rules, words, symbols, and codes used to write
computer programs
– To write a program, appropriate software for the
programming language being used is needed
• Categories of Programming Languages
– Types of programs they are designed to create
• Procedural languages or object-oriented languages
– How evolved the programming language is
• Levels or generations
Programming Languages

– Low-Level Languages (earliest programming languages)


• Machine language
– Written at a very low level, just using 1s and 0s
– First generation of programming languages
• Assembly language
– Includes some names and other symbols to replace
some of the 1s and 0s in machine language
– Second generation of programming languages
– Machine dependent
» Written for one specific type of computer
Programming Languages
Programming Languages

– High-Level Languages
• Closer to natural languages
• Machine independent
• Includes 3GLs (FORTRAN, BASIC, COBOL,C, etc.) and
object-oriented languages (Visual Basic, C#, Python,
Java, etc.)
• Visual or graphical languages
– Use graphical interface to create programs
– Designed for educational purposes
Programming Languages

– Fourth-Generation Languages (4GLs)


• Even closer to natural languages and easier to work
with than high-level
• Declarative rather than procedural
• Includes structured query language (SQL) used with
databases
• Common Programming Languages
– Languages not widely used today
• Logo (teach children how to program)
• PL/1 (business and scientific applications
• Prolog and LISP (artificial intelligence)
• Smalltalk (one of the first object-oriented languages)
Programming Languages

– FORTRAN
• High-level programming language used for
mathematical, scientific, and engineering applications
• Efficient for math, engineering and scientific
applications
• Still used today for high-performance computing tasks
(weather forecast)
Programming Languages
Programming Languages

– COBOL
• Designed for business transaction processing
• Makes extensive use of modules
• Strength lies in batch processing and its stability
• Programs are lengthy and take a long time to write
• Considered to be outdated by some
• New versions are evolving
– COBOL.NET
Programming Languages
Programming Languages

– PASCAL
• Created as a teaching tool to encourage structured
programming
• Contains a variety of control structures used to
manipulate modules systematically
Programming Languages

– BASIC
• Easy-to-learn, high-level programming language that
was developed to be used by beginning programmers
• Visual Basic:
– Object-oriented version of BASIC; uses a visual
environment
Programming Languages

– C, C++, and C#
•C
– Much closer to assembly language than other high-
level languages
– Designed for system programming
• C++
– Object-oriented versions of C
– Very popular for graphical applications
• C# (C sharp)
– Used to create Web applications and XML-based
Web services
• Objective-C:
– For iPhone and other Apple applications
Programming Languages
Programming Languages

– Java
• High-level, object-oriented programming language
frequently used for Web-based applications
• Java programs are compiled into bytecode
• Can run on any computer that includes Java Virtual
Machine (Java VM)
• Can be used to write Java applets
– Scroll text on Web page, games, calculators, etc
• Is one of the most popular programming languages
today
Programming Languages
Programming Languages

– Python
• Open-source, dynamic, object-oriented language that
can be used to develop a variety of applications
• Gaming, scientific, database, and Web applications
• Only recently gaining a following
Programming Languages

– Ruby
• Open-source, object-oriented language that can be
used to create general-purpose or Web applications
• Uses a syntax that is fairly easy to read and write,
allowing programmers to create database-driven Web
applications easily and quickly
Quick Quiz

1. An example of a high-level programming language is


______________________.
a. Pascal
b. Assembly language
c. Machine language
2. True or False: Visual Basic is an object-oriented version of
COBOL.
3. Java applets are small programs written in the
______________________ programming language.
Answers:
1) a; 2) False; 3) Java
Summary

• Approaches to Program Design and Development


• The Program Development Life Cycle (PDLC)
• Tools for Facilitating Program Development
• Programming Languages

You might also like