0% found this document useful (0 votes)
11 views7 pages

Problem Solving Skill

Uploaded by

rayemraisa2007
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)
11 views7 pages

Problem Solving Skill

Uploaded by

rayemraisa2007
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/ 7

INTRODUCTION:

In order to build a computer system that performs a specific task or solves a given problem, the
task or problem has to be clearly defined, showing what is going to be computed and how it is
going to be computed. This chapter introduces the tools and techniques that are used to design
a software solution that together with the associated computer hardware will form a computer
system.

What is a computer system?

A COMPUTER SYSTEM is made up of software, data, hardware, communications and people;


each computer system can be divided up into a set of sub-systems. Each subsystem can be
further divided into sub-systems and so on until each sub-system just performs a single action.

Computer systems can be very large or very small or any size in between; most people interact
with many different computer systems during their daily life without realizing it.

For example, when I wake up in the morning I use an app on my smart phone for my alarm, I
then check the weather forecast on my computer before I drive to work. The alarm program is a
very small computer system; when I check the weather forecast I obtain information from one of
the largest computer systems in the world.

STEPS IN PROBLEM SOLVING:

Using computer to solve problem involves far more than just writing a program. In fact many
computer applications are carried out without writing new programs. Existing software is used if
possible.
Solving a problem may be seen in three main stages:
1. Defining exactly what the problem is.
2. Designing the solution to deal with it.
3. Putting that solution into practice.
In solving an information processing problem we should define:
1. The data which is to be input.
2. The data which is to be output.
3. The data which is to be stored as files.
4. The processing tasks to be carried out.
SYSTEM

A system is a set of components forming an integrated whole, which works as a unit. An


information processing system consists of everything required to carry out a particular
processing task.

Tools and techniques:


In order to understand how a computer system is built up and how it works, it is often divided up
into sub-systems. This division can be shown using top-down design to produce structure
diagrams that demonstrate the modular construction of the system.

Each sub-system can be developed by a programmer as sub-routine or an existing library


routine may be already available for use. How each sub-routine works can be shown by using
flowcharts or pseudocode.

EXAMPLES OF INFORMATION PROCESSING SYSTEM & ITS SUBSYSTEM:


1. The stock control system for a shop. (The system comprises)

a. The methods of checking on stock levels, of ordering new goods, of recording


their delivery and so on.
b. The means of communication with suppliers.

2. The working system in an office. This would include:

a. The methods of communication (by letters, emails or telephone)


b. The methods of storage information (by filing cabinets or CD‟s or other storage
media)
c. The methods of producing letters (word processors, or copiers etc)

COMPUTERIZED INFORMATION PROCESSING SYSTEM:

In general a computerized information processing system includes:


1. Computer and other hardware.
2. Computer Software
3. Methods of collecting, checking and inputting data
4. Methods of communication
5. Processing operations carried out on data
6. Method of outputting data.

Advantages of designing a solution to a problem by splitting it up into smaller problems


(top- down/modular design)

Produce and describe top-down/modular designs using appropriate techniques,


including structure diagrams, showing stepwise refinement

Subsystem:
A unit or device that is part of a larger system. For example, a disk subsystem is a part of a
computer system. A bus is a part of the computer. A subsystem usually refers to hardware, but
it may be used to describe software. However, "module," "subroutine" and "component" are
more typically used to describe parts of software.

Library
In computer science, a library is a collection of non-volatile resources used by computer
programs, often to develop software. These may include configuration data, documentation,
help data, message templates, pre-written code and subroutines, classes, values or type
specifications.

Library code is organized in such a way that it can be used by multiple programs that have no
connection to each other.

Most compiled languages have a standard library although programmers can also create their
own custom libraries. Most modern software systems provide libraries that implement the
majority of system services

Routine / Program
A set of programming instructions designed to perform a specific limited task.

 Routine, another name for a computer subprogram


o Subroutine, a routine (program) inside another routine (program)

Subroutine

In computer programming, a subroutine is a sequence of program instructions that perform a


specific task, packaged as a unit. This unit can then be used in programs wherever that
particular task should be performed.

Subprograms may be defined within programs, or separately in libraries that can be used by
multiple programs. In different programming languages, a subroutine may be called a
procedure, a function, a routine, a method, or a subprogram. The generic term callable unit
is sometimes used.

Stepwise refinement:

Stepwise refinement is the process of developing a modular design by splitting a problem into
smaller sub-tasks, which themselves are repeatedly split into even smaller sub-tasks until each
is just one element of the final program.

Top down/modular design:

A Top-down design is when a problem is split into smaller sub-problems, which themselves are
split into even smaller sub-problems until each is just one element of the final program.
Top down design provides a method of producing computer programs or systems. These are
the main features of top-down design:

 The program is broken down into parts of modules


 The parts or modules are broken down into more parts or modules.
 Soon each part or module is easy to produce because it contains enough detail.

Breaking problems into smaller parts makes it clear what needs to be done. At each stage of
refinement, the problem becomes less complex and easier to work out.
Benefits and drawbacks of modular programs

Benefits Drawbacks
Smaller problems are easier to understand Modules must be linked and additional testing must
be carried out to make sure that the links work
correctly.
Smaller problems are easier to test and debug Programmers must be sure that cross-referencing
is done
Development can be shared between a team of Interface between modules must be planned
programmers- each person programming different
modules according to their tasks and skills.
Code from previously programmed modules can be
reused.

Data structure diagram

Data structure diagram (DSD) is a diagram of the conceptual data model which documents the
entities and their relationships, as well as the constraints that connect to them.

The basic graphic notation elements of DSDs are boxes which represent entities. The arrow
symbol represents relationships. Data structure diagrams are most useful for documenting
complex data entities.

A structure diagram shows the overall structure of a multimedia product.

Structure diagrams

A structure diagram is a pictorial representation of a modular system.


The initial stage in the design of an algorithm to solve a more complex problem is to break down
the problem into smaller units that can be considered as separate problems.

A diagram can be used to show how this is achieved. This is known as structure diagram.

Structure diagrams are particularly useful when the problem has been broken down into these
smaller tasks and then broken down into even smaller subtasks. This Method of solving problem
is known as top-down design or stepwise refinement.

e.g. a structure diagram of an alarm app:

A detailed structure diagram showing breakdown of tasks

Shop for Food

Write a list of what is Do actual shopping Take Food home &


needed store

Check what Write list Select food Pay for food Unpack Food Put into store
food already
in store

ALGORITHM:

An algorithm is a sequence of steps for solving a problem. In general, an 'algorithm' is the


name given to a defined set of steps used to complete a task. For instance you could define an
algorithm to make a cup of tea. You start by filling the kettle, and then place a tea bag in the cup
and so on. In computer terms, an algorithm describes the set of steps needed to carry out a
software task. This mini-web takes you through the topic of algorithm.
Creating a plan

The main stages of planning any solution are:


• understanding the problem
• defining the scope of a solution – the extent of the facilities that the solution will provide
• creating the solution
• documenting the solution
• testing the solution.
Creating the solution

This involves:

• top-down design or stepwise refinement


• Algorithms, which can be represented as
– Program flowcharts
– Pseudo code
• Modules of code
• Menus.

Document the solution

Techniques for documenting an algorithm include:


• Structure diagrams
• Program flowcharts (for symbols, see Table 9.1 in course book).
For documenting the hardware required in a solution while showing much less processing detail,
we can use system flowcharts, which have a much larger set of symbols.

Testing and interpreting algorithms

Dry running is the process of thinking through the operation of an algorithm, to test it during
design, for troubleshooting and to work out its purpose, if not stated.
A trace table is a tabular record of a dry run. It has a column for each variable, usually in the
order in which their values are first assigned. Each row is completed with the values of the
variables whenever they change, moving to the next row when necessary.

Algorithm vs Pseudocode :

An algorithm is simply a solution to a problem. An algorithm presents the solution to a problem


as a well-defined set of steps or instructions. Pseudo-code is a general way of describing an
algorithm.
Pseudo-code does not use the syntax of a specific programming language, therefore cannot be
executed on a computer. But it closely resembles the structure of a programming language and
contains roughly the same level of detail.

Algorithm:

An algorithm gives a solution to a particular problem as a well-defined set of steps. Algorithms


can be expressed using natural languages, pseudocode, flowcharts, etc.
Pseudocode:
Pseudocode is one of the methods that could be used to represent an algorithm. It is not written
in a specific syntax that is used by a programming language and therefore cannot be executed
in a computer.

There are lots of formats used for writing pseudocodes and most of them borrow some of the
structures from popular programming languages such as C, Lisp, FORTRAN, etc.

You might also like