0% found this document useful (0 votes)
2 views

cc111lecture09

This document provides an overview of program development and programming languages, detailing the Program Development Life Cycle (PDLC) and various programming approaches such as procedural, object-oriented, and adaptive software development. It discusses the importance of good program design, coding standards, debugging, and testing, as well as popular programming languages including FORTRAN, COBOL, Java, and Python. The document emphasizes the significance of documentation throughout the development process to ensure clarity and maintainability.

Uploaded by

Muhammad Umar D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

cc111lecture09

This document provides an overview of program development and programming languages, detailing the Program Development Life Cycle (PDLC) and various programming approaches such as procedural, object-oriented, and adaptive software development. It discusses the importance of good program design, coding standards, debugging, and testing, as well as popular programming languages including FORTRAN, COBOL, Java, and Python. The document emphasizes the significance of documentation throughout the development process to ensure clarity and maintainability.

Uploaded by

Muhammad Umar D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

CC111: Introduction to Computers

Lecture 9: Program Development and Programming Languages

1 By: Dr. Wael Hosny


Overview
 This chapter covers:
 The most common approaches to program design and
development
 The steps in the program development life cycle (PDLC)
 Tools that can facilitate program development
 Popular programming languages

2 By: Dr. Wael Hosny


Approaches to Program Design and Development
 Procedural programming: Focuses on the step-by-step
instructions that tell the computer what to do
 Uses procedures (modules, subprograms): Smaller sections of code that
perform particular tasks
 Allows each procedure to be performed as many times as needed
without requiring multiple copies of code
 Prior to procedural programming, programs were one large set of
instructions containing statements that sent control to different parts of
the program as needed (i.e. GOTO statements)
 Structured programming: Breaks the program into small chunks
 Top-down design

3 By: Dr. Wael Hosny


Approaches to Program Design and Development
 Variables: Named memory locations that are
defined for a program
 Used to store the current value of data items used in
the program

4 By: Dr. Wael Hosny


Approaches to Program Design and
Development
 Object-oriented programming (OOP): Programs consist of a
collection of objects
 Objects: 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

5 By: Dr. Wael Hosny


Approaches to Program Design and
Development
 Aspect-oriented programming (AOP): Breaks program into
small pieces that overlap in functionality as little as possible
 Program components can be developed and modified individually, and
easily reused
 Adaptive software development: Designed to make program
development faster and more efficient and focus on adapting the
program as it is being written
 Iterative: Cyclical approach that allows the repetition of steps and tasks
as needed
 Incremental: Developing one piece at a time
 Includes RAD (rapid application development) and extreme
programming (XP)
 More recent adaptive software development approaches are called agile
software development
6 By: Dr. Wael Hosny
The Program Development Life Cycle (PDLC)
 Program development: The process of creating
application programs
 Program development life cycle (PDLC):The steps
involved with creating programs

7 By: Dr. Wael Hosny


The Program Development Life Cycle
(PDLC)
 Problem analysis: The problem is considered and the program
specifications are developed
 Specifications developed during the SDLC are reviewed by the systems
analyst and the programmer (the person who will code the program)
 Goal: To understand the functions the software must perform
 Documentation: Includes program specifications (what it does,
timetable, programming language to be used, etc)

8 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Program design: The set of steps needed in order for the
program to perform the tasks it is supposed to perform
(algorithm) is developed
 Good program design is extremely important
 Program design tools
 Structure charts: Depict the overall organization of a program
 Flowcharts: Show
graphically step-by-step
how a computer program
will process data
 Use special symbols and
relational operators

9 By: Dr. Wael Hosny


Flowcharts

10 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Pseudocode: Uses English-like statements to outline the logic of a program

11 By: Dr. Wael Hosny


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, use case diagrams, etc.
 Business Processing Modeling Notation (BPMN): Graphical
notation used to depict the steps in a business process
 Expresses business processes graphically using Business Process Diagrams
 Look similar to flowcharts
 Designed to be understood by everyone

12 By: Dr. Wael Hosny


Unified Modeling Language (UML)
Models

13 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Control structure: A Pattern for controlling the flow of logic in a
computer program
 Sequence control structure: Series of statements that follow one another
 Selection control structure: Multiple paths, direction depends on result of test
If-then-else
 Case
 Repetition control structure: Repeat series of steps
 Do-while
 Do-until

14 By: Dr. Wael Hosny


Control Structures

15 By: Dr. Wael Hosny


Control Structures

16 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Good program design:
 Saves time
 Creates better programs
 Good program design principles:
 Be specific
 All things the program must do need to be specified
 One-entry-point/one-exit-point rule
 No infinite loops or other logic errors
 Infinite loop: Series of steps that repeat forever
 Design should be tested to ensure logic is correct
 Desk check; tracing tables
 Documentation: Includes design specifications

17 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Program coding: The process of writing the programming
language statements to create a computer program
 When choosing a programming language, consider:
 Suitability to the application
 Integration with other programs
 Standards for the company
 Programmer availability
 Portability if being run on multiple platforms
 Development speed
 Coding creates source code

18 By: Dr. Wael Hosny


Coding Standards
 Coding standards: A list of rules designed to standardize
programming styles
 Make programs more universally 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
 Reusable code: Generic code segments that can be used over and
over again with minor modifications
 Can greatly reduce development time
 Documentation: Includes documented source code

19 By: Dr. Wael Hosny


Coding Standards

20 By: Dr. Wael Hosny


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
 Before they can be debugged, coded programs need to be translated
into executable code
 Source code: Coded program before it is compiled
 Object code: Machine language version of a program
 Language translator: Program that converts source code to machine language

21 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Types of language translators:
 Compilers: Combines program with other
object modules and creates a finished
executable program
 Interpreters: Translates one line of
code at one time
 Assemblers: Convert assembly language
programs into
machine
language

22 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)

• Preliminary debugging: Finds initial errors


• Compiler errors: Must be corrected before the logic of the
program can be tested
• Syntax errors: Occur when the programmer has not followed the
rules of the programming language
• Program won’t run; usually an error message is displayed
• Run time error: Occurs when the program is running
• Often logic errors: Program will run but produces incorrect
results
• Dummy print statements can help locate logic errors and
other run time errors

23 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)
 Testing occurs after the program appears to be correct to find any
additional errors
 Should use good test data
 Tests conditions that will occur when the program is implemented
 Should check for coding omissions (product quantity allowed to be < 0,
etc.)
 Alpha test (inside organization)
 Beta test (outside testers)
 Documentation: Completed program package (user’s manual,
description of software commands, troubleshooting guide to help
with difficulties, etc.)

24 By: Dr. Wael Hosny


The Program Development Life Cycle (PDLC)

 Program implementation and maintenance: Installing and


maintaining the program
 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

25 By: Dr. Wael Hosny


Programming Languages
 Programming language: A set of rules used to write computer
programs
 To write a program, you need appropriate software for the
programming language you will be using
 Categories of programming languages
 Low-level languages: Difficult to code in; machine dependent
 Machine language: 1s and 0s
 Assembly language: Includes some words and symbols

26 By: Dr. Wael Hosny


Programming Languages
 High-level languages: Closer to natural languages and so are easier to
write in
 Machine independent
 Includes third-level procedural languages such as FORTRAN, BASIC,
COBOL, Pascal, and C, as well as newer object-oriented languages such as
Visual Basic, C++, C#, Python, Ruby, and Java
 Fourth-generation languages (4GLs): Even closer to natural languages
and easier to work with than 3GLs
 Declarative rather than procedural
 Includes structured query language (SQL) used with databases

27 By: Dr. Wael Hosny


Programming Languages
 Natural programming languages: Users can communicate in their native
language
 Doesn’t have to follow program syntax
 In the infancy stage
 Visual programming languages: Uses a visual programming environment
 User can use mouse and graphical interface and the code is automatically generated
 Visual versions of many programming languages
 Visual programming environment (VPE): Use visual elements to assist in program
development but still require some coding

28 By: Dr. Wael Hosny


Common Programming Languages
 FORTRAN: High-level programming language used for
mathematical, scientific, and engineering applications
 Efficient for math
and scientific
applications

29 By: Dr. Wael Hosny


Common Programming Languages
 COBOL: Designed for business transaction processing
 Makes extensive use of modules and submodules
 Being phased out in many organizations

30 By: Dr. Wael Hosny


Common Programming Languages
 Pascal: Created as a teaching tool to encourage structured
programming
 Contains a variety of control structures used to manipulate
modules systematically

31 By: Dr. Wael Hosny


Common 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 which helps
programmers quickly and easily create programs through the
use of a visual environment

32 By: Dr. Wael Hosny


Common Programming Languages
 C: Designed for system programming
 C++, and C#: Object-oriented versions of C

33 By: Dr. Wael Hosny


Common Programming Languages
 Java: High-level, object-oriented programming language
frequently used for Web-based applications
 Platform independence is one of Java’s biggest advantages
 Any operating system or browser that understands Java (compiled
Java programs) can run Java bytecode applications
 Is one of the most popular programming languages today
 Can be used to write Java applets

34 By: Dr. Wael Hosny


Common 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

35 By: Dr. Wael Hosny


Common 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

36 By: Dr. Wael Hosny

You might also like