0% found this document useful (0 votes)
6 views44 pages

Computer Program.CSC102.WK5

The document outlines the fundamentals of problem-solving in programming, including definitions of computer programs and programming languages, as well as the steps involved in program development. It details various programming languages, their uses, and programming aids such as flowcharts and data flow diagrams. Additionally, it introduces Project-Based Learning (PBL) as an effective method for teaching problem-solving skills.

Uploaded by

deboraholamide82
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)
6 views44 pages

Computer Program.CSC102.WK5

The document outlines the fundamentals of problem-solving in programming, including definitions of computer programs and programming languages, as well as the steps involved in program development. It details various programming languages, their uses, and programming aids such as flowcharts and data flow diagrams. Additionally, it introduces Project-Based Learning (PBL) as an effective method for teaching problem-solving skills.

Uploaded by

deboraholamide82
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/ 44

CSC 102

INTRODUCTION TO
PROBLEM SOLVING

Programming Aids
and Techniques
Module 5
Lecture 5 & 6

www.tech-u.edu.ng | [email protected]
Lecture Outline
❑Computer Program

❑Programming Languages

❑Steps in Program Development

❑Programming Aids
Computer Program

➢ What is a Computer Program?

❑ A set of instructions that describes the logical steps


the computer will follow to solve a given problem.

❑ In other words, it is a list of instructions that tells the


Computer what to do to solve a problem.

▪ The art of program writing is called Programming.

▪ A Programmer is the Specialist that writes


Programmes
Computer Program

➢ What is a Computer Program?

❑ A programming language is a vocabulary and set


of grammatical rules for instructing a computer or
computing device to perform specific tasks.

❑ Each programming language has a unique set of


keywords (words that it understands) and a special
syntax for organizing program instructions.
Programming Languages
10 Best Programming Languages of 2019
Programming Languages (Cont’d)
1. Python

❑ It is becoming an all-in-one language that has the


ability to expand web apps, data analysis, user
interfaces, and much more, and frameworks are also
available for these tasks.
2. Java

❑ Java can be utilized for mobile-based applications,


enterprise-level purpose, for creating desktop
applications, and for establishing Android apps on
tablets and smartphones
Programming Languages (Cont’d)
3. PHP

❑ The web developers should learn about PHP or


Hypertext Preprocessor, a well-known programming
language. With the help of PHP, you can enlarge a
web app very quickly and effortlessly.
4. JavaScript

❑ JavaScript is extremely functional. JavaScript is


applied for including animations on the web pages,
loading fresh images, scripts or objects on web page,
and craft hugely responsive user interfaces.
Programming Languages (Cont’d)
5. Objective-C

❑ For constructing apps for iOS that can be deposited


in App Store. With Objective-C, you can begin
applying XCode that is known to be the authorized
software development tool from Apple.
6. Ruby

❑ This programming language is applied massively for


web programming and hence turned out to be the
ideal selection for the beginner companies.
Programming Languages (Cont’d)
7. Perl

❑ This is mainly used for sites and web app expansion,


desktop app development and system
administration, and test automation that can be
applied to testing databases, web apps, networking
devices, and much more.
8. C, C++ and C#
❑ C++ or C plus plus is a bit more progressive than C. It is
an ideal selection for strong desktop software as well
as apps for mobiles and desktop. C# is actually the
prime language for Microsoft applications and
services.
Programming Languages (Cont’d)

9. SQL (Structured Query Language)

❑ This is a Standard Query Language for performing


operations on databases such as Microsoft SQL Server,
Oracle, MySQL, etc, It is used for acquiring the needed
data from big and multifaceted databases.

10. Swift

❑ This language can be utilized by you for building apps for


iOS activated devices and MAC systems in a quick and
simple method. Swift programming language.is very ideal
for iOS application.
Steps in Program Development

I. Problem Identification.
II. Problem Analysis.
III. Data Analysis and Validation.
IV. Input/Output Specification.
V. Algorithm Development.
VI. Flowcharting.
VII. Program Coding.
VIII.Preparing test data, Running and Debugging the
program.
IX. Program Documentation.
Steps in Program Development
I. Problem Identification.

❑ The first step in Programming is the identification of


the nature and complexity of the problem or task to
perform. Naturally, mathematical problems are
easier to define since formulas are involved and
hence they are well-defined.

❑ Commercial applications or systems may involve so


many subtasks, procedures and routines that must
be clearly defined and formulated using
mathematical statements and operators to solve
Steps in Program Development (Cont’d)

2. Problem Analysis

I. Problem analysis involves analysing the various


procedures or routines defined to find a method of
solution. With mathematical problems, the data are
either individual data items or an array of data.

II. The nature of the problem and analysis guide on


how data can be represented within the computer
for easier manipulation, are also part of this process.
Steps in Program Development (Cont’d)

3. Data Analyses and Validation

❑ Data Alalyses involve a review of the nature of the


data that the application will manipulate.

❑ The nature of data affects the following:

▪ the choice of programming language.

▪ the data structures to use.

▪ the execution time.

▪ the memory space needed for execution.


Steps in Program Development (Cont’d)

Data Validation

❑ This involves filtering bad data from good ones. It is to


allow the computer to process only the correct data,
going by the acronym GIGO, Garbage-In, Garbage-Out,
that is, bad input produces bad result or output.

❑ Some validation checks include:


Range Check - Consistency Check
Numeric Data Check - Date Check
Alphabetic Data Check - etc
Steps in Program Development (Cont’d)

4. Input/Output Specifications

❑ A good programmer needs basically a thorough


knowledge of both the input and output
specification.

❑ In system design, once the inputs that go into the


system are known, and the format of output
presentation is determined, the only consideration left
is the various procedures and operations that will
transform the input data into the desired output.
Steps in Program Development (Cont’d)

❑ Generally, pertinent questions should be asked.

❑ These include:

▪ The type and nature of input data.

▪ The medium of presentation (Screen or File)

▪ The type and nature of output data.

▪ The medium of presentation of the output (Screen or


File)
Steps in Program Development (Cont’d)

5. Algorithm Development
❑ An algorithm is a step-by-step method or rules for solving a
problem in a finite sequence of steps.
❑ Algorithm is mostly used as an accepted term in the field
of mathematics and computer science. It involves
describing in literal terms the steps to be taken to solve a
given problem.

❑ A good algorithm is composed of:


▪ At least an input
▪ At least an output
▪ Unambiguous statements
▪ Finite number of steps
Steps in Program Development (Cont’d)

6. Flowcharting

❑ Flowcharting is one of the widely-used techniques


for specifying an algorithm in Computer Science.

❑A flowchart can simply be defined as a


diagrammatic representation of algorithms.

❑ It is a pictorial representation of a complex


procedure with considerable clarity
Steps in Program Development (Cont’d)

6. Flowcharting

❑ Flowcharting is one of the widely-used techniques


for specifying an algorithm in Computer Science.

❑A flowchart can simply be defined as a


diagrammatic representation of algorithms.

❑ It is a pictorial representation of a complex


procedure with considerable clarity
Steps in Program Development (Cont’d)

7. Program Coding

❑ Coding is the actual writing of the set of instructions


the computer follows to solve the problem. This set
of instructions is called computer program.

❑ An effective coding results from well-formulated


algorithm and flowcharting. Having done these
two, coding then becomes just writing instructions
according to specified rules.
Steps in Program Development (Cont’d)

7. Program Coding

❑ BASIC programming is different from C and C# is


different from JAVA programming.

❑ Therefore, coding involves writing statements


corresponding to each box of the flowchart
following the syntax of a chosen programming
language.
Steps in Program Development (Cont’d)
8. Preparing Test data, Running and Debugging the
program

❑ Having coded the program, the next step is to use


test data to see the effectiveness or adequacy of
the program.

❑ It takes a genius to develop a program that will run


at first instance.
Steps in Program Development (Cont’d)
8. Preparing Test data, Running and Debugging the
program

❑ A very common error type is a syntax error, that is,


error resulting from wrong coding such as
misspelling.

❑ Errors are generally referred to as "bugs", and the


process of removing these errors is called
"debugging".
Steps in Program Development (Cont’d)
8. Preparing Test data, Running and Debugging the
program

❑ Secondly, a program may be free of bugs and yet


fail to yield the expected result. The error resulting
to this is called semantic error; that is, it has to do
with the logic of the program.
❑ An effective program must be syntactically and
semantically correct.
❑ Running a program or simply the word “run” means
to execute the program to give the expected
result.
Steps in Program Development (Cont’d)
9. Program Documentation
❑ Documentation means to give a concise
description of programs in the form of user manual
and operating instructions.
❑ The manual normally includes a detailed
description of the problem definition, flowcharts,
and Hierarchical Input Processing and Output
(HIPO) chart.

❑ Documentation gives systems’ specifications as


well as the method of putting the program to use. It
can be classified into (a) Internal and (b) External
documentations.
Steps in Program Development (Cont’d)
9. Program Documentation
❑ Internal documentation is the on-line help that
comes as part of the software. This is a concept
that has led to user-friendliness in software
development.
❑ External documentation involves the user manual
and operating manual.
❑ The user manual contains such information that will
serve as a guide to the user while the operating
manual gives details about the efficient use of the
system for the operator. These are explanatory
notes for the user.
Programming Aids

➢ Programming Aids
❑ These are useful tools for computer science students
in designing systems.
❑ The tools include:
▪ Data Flow Diagram (DFD)
▪ System/Program Flowchart
▪ Hierarchy/Structure chart
▪ HIPO
Programming Aids (Cont’d)

➢ Data Flow Diagram (DFD)

❑ This is a graphical presentation of the system’s


component processes and the flow of data
between them.

❑ It shows the flow of data as well as the various


operations needed to transform the data to useful
results.

❑ DFD consists of the processes, the data flows, the


actor objects and the data store.
Programming Aids

➢ Data Flow Diagram (DFD)

❑ Data Flow Diagram (DFD)

The symbols are:

▪ The Process represents the actions needed to process


the data.
▪ The Entity represents the data source and destination.
▪ The Data Store represents the storage of data.
▪ The Data Flow indicates the direction of flow of data.
Programming Aids

➢ Data Flow Diagram (DFD)


❑ Advantages
▪ It is easy to learn and understand.
▪ It gives a better understanding.
▪ It provides an excellent documentation for the
system.

❑ Disadvantages
▪ It never shows the flow of control.
▪ It depicts less programming logic.
▪ Loops cannot be represented.
Programming Aids
Programming Aids
➢ Program Flowchart (Block Diagram)

❑ This presents a detailed illustration of the steps


involved in solving a problem.

❑ The program flowchart is particularly used for


presenting the programming logic, and it helps in
simplifying discussions between system and
programming functions.

❑ It is the computer programmers’ tool and is used to


express the step-by-step logic employed by the
Programming Aids
➢ Program Flowchart (Block Diagram)
Programming Aids
➢ Program Flowchart (Block Diagram)

❑ Advantages

▪ It shows clearly the logical interrelationships among


the various components.

▪ It gives a general overview of the whole system.

▪ It simplifies the programming task.

▪ It makes error detection procedures easier.


Programming Aids
➢ Program Flowchart (Block Diagram)

❑ Disadvantages

▪ It becomes clumsy when large systems are


involved.

▪ Rather than simplifying the whole system, it may


contain a higher level of abstract.

▪ A modification to the code may result in design


modification.
Programming Aids
➢ Hierarchy or Structure Chart

❑ This chart is employed by the systems analyst to


present the procedures of a system in a tree-like
manner.

❑ It is much similar to an organizational chart which


presents a hierarchical view of a system. Like in any
organization, controls flow from top downward the
ladder.

❑ While the flow of control is top-down, the flow of


work is bottom-up.
Programming Aids
➢ Hierarchy or Structure Chart
Programming Aids

➢ Hierarchical plus Input Process Output (HIPO)

❑ Pronounced “hypo”. HIPO is based on hierarchical


chart and is concerned with what each module
does.

❑ That is, each module of the hierarchical chart is


represented one after the other in terms of what
goes in as input, the various procedures and
operations carried out on the input data (process),
and the expected result (output).
Programming Aids

➢ Hierarchical plus Input Process Output (HIPO)


Project-Based Learning (PBL)

❑ PBL is an individual or group activity that goes on


over a period of time, resulting in a product,
presentation, or performance.

❑ PBL typically has a timeline, milestones, and other


aspects of formative evaluation as the project
proceeds.

❑ Doing a project and solving a problem have much


in common.
Project-Based Learning (Cont’d)
❑ For example, in PBL a student or team of students
typically have considerable latitude in posing the
details of what will be accomplished in the project.

❑ There are limited resources, such as time. There is a


clear goal of a product, presentation, or
performance. The student or team of students may
well develop a high level of ownership as they work
on the project.

❑ Thus, any PBL environment is a good environment


for teaching problem solving.
Project-Based Learning (Cont’d)

❑ PBL shares much in common with Process Writing.

❑ A six step version of Process Writing is:


▪ brainstorming
▪ organizing the brainstormed ideas
▪ developing a draft
▪ obtaining feedback
▪ revising, which may involve going bask to earlier
steps
▪ publishing
Thank you

You might also like