Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

CSM 157 PROGRAMMING-Week1

CSM 157 is an introductory course designed for absolute beginners in programming, focusing on writing algorithms and understanding the software development cycle. The course covers key concepts such as algorithms, programming errors, variables, control structures, and various programming languages, along with practical skills like flowcharting and sorting/searching techniques. The software development cycle is broken down into four major steps: specification, development, validation, and evolution, emphasizing the importance of documentation and maintenance.

Uploaded by

chamahdavida30
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CSM 157 PROGRAMMING-Week1

CSM 157 is an introductory course designed for absolute beginners in programming, focusing on writing algorithms and understanding the software development cycle. The course covers key concepts such as algorithms, programming errors, variables, control structures, and various programming languages, along with practical skills like flowcharting and sorting/searching techniques. The software development cycle is broken down into four major steps: specification, development, validation, and evolution, emphasizing the importance of documentation and maintenance.

Uploaded by

chamahdavida30
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

CSM 157 INTRODUCTION TO STRUCTURED

PROGRAM DESIGN

BY
J. B. HAYFRON-ACQUAH
DEPARTMENT OF COMPUTER SCIENCE
KNUST
KUMASI
Aim of the Course
• Intended for those without any prior knowledge of programming or
absolute beginners

• To help learners write set of instructions for solving problems


Course Outline
Software Development Cycle Input Statements

Algorithms Input and Output Statements

Properties of Algorithms Operators – Mathematical, Relational, Logical and


Unary
Classification of Algorithms Precedence Rules of Arithmetic Operators

Types of Programming Errors Mathematical Expressions and rules for writing


expressions
Components of an Algorithms Control Structures – Sequence, Decision making and
looping
Variables and their naming Examples of Algorithms

Variable Declarations Flowcharts

Variable declarations Subprograms or subroutines or functions

Variable Initialisation Arrays


Course Outline
Program Translators :-
Interpreters
Assemblers
and Compilers
Sorting –
Bubble
Selection
Insertion
and Radix Sort
Searching –
Linear
Binary Search
Learning objectives
After reading this unit you should be able to
• Explain what programming is and what is a program
• The software development cycle
• Explain what an algorithm is
• Explain what the properties of an algorithm are
• Different types of programming errors
• Understand what is a variable and how they named
• Explain what goes into writing an algorithm
- Input and output statement
- Operators (Arithmetic, Relational and Logic)
- Expressions
- Control Structures (Sequence, Looping and Decision making)
Learning Objectives
• Writing algorithms
• Flowcharts
• Drawing flowcharts
• Subprograms
• Use of subprograms in an algorithm
• Different types of programming languages
• Programs translators and their functions
• How a program is converted to executable file
Learning Objectives
• The use of Arrays
• Understand sorting and some sorting techniques
• Understand searching and some searching techniques
Computer Programming
• Programming is the act of writing a set of instructions in solving
problems. Thus, Computer programmers write instructions for a
computer to execute.

• The instructions for the computer to execute are written in a


programming language

• The language can be either Machine, Assembler or High level


language

• The one who writes a computer program is called a programmer


Software Development Cycle
• Defines the various processes involved in software development and
maintenance

• The objective is to produce software product for a customer (user)

• There are four major steps


STEP 1: SOFTWARE SPECIFICATION
(PROGRAM DEFINITION)
i. Program Objectives – What exactly does the user want

ii. Output - What kind of results is the program expected to generate


or produce

iii. Input Data - What inputs can generate the expected output

iii. Processing – What instructions can generate the expected output


from the input data

iv. Specification document – all the above must be document for


reference
STEP 2: SOFTWARE DEVELOPMENT
This involves using the software specification to develop the required
software for the client

- Program Design : Deals with the design of the solution using any of the
following:
-Top-Down design (use of modules/subprograms)
-Pseudocode/Algorithms (Using English and Mathematical expressions
in writing the logical set of instructions)
-Flowcharts (A graphical/pictorial representation of the logical set of
instructions)

- Program code – Conversion of the algorithm/flowchart into a language that


the computer can understand (programming languages)

- Development documentation
STEP 3: SOFTWARE VALIDATION
The main aim of this step is to validate the software to see if it does exactly
what the customer wants. To do this basically involved two things namely:
• Program testing : Using sample input data to see if the output generated is
what is expected. The sample data must be a data whose manual output is
known.

• Debugging: Usually carried out if the testing produce wrong output. It


involves locating the error and correcting it.

• Validation documentation
STEP 4: SOFTWARE EVOLUTION
- Maintenance : Is done to ensure that the software meets the
changing need of the customers. This is because customer needs do
change over time.

- Documentation: To provide description of the program and the


procedures used.

You might also like