Uploaded by taniahr125

Lesson 1 - Identifying Programmable Problems

advertisement
Lesson 1. Identifying programmable problems
Introduction
This is the first lesson you would be following for the “ICT project” module. As you know the
course requirement of this module is to develop a software solution to a real life problem. This
lesson will provide the basic information required to identify an effective problem for your
project. In this lesson you will learn what problems can be solved using a software based
system and how to identify a programming problem that you need to design and develop by
yourself throughout this course.
Learning Outcomes
After completing this lesson you would be able to,




Define a programmable problem
Identify what problems are programmable
Identify inputs required to solve problems
Differentiate between programmable and non-programmable problems
Do you know that every real- world problem cannot be solved using a computer? You might be
wondering to hear this. How this is possible in the powerful computer era that we are
experiencing today?
People are fascinated about smart devices of latest advancement of technology such as:

self-driving trucks,

reversing paralysis (i.e. brain implants to restore the freedom of movement that spinal
code injuries takes away), and

face detection systems which authorize payments
1
But still, there are some real world problems that still a computer cannot solve. This lesson
guide you to identify a programmable problem which can be solved with a software based
system and non-programmable questions that can’t be solved by using a computer.
Programmable problems
Are you aware of programmable problems? Any real world problem that can be solved using a
computer program is called a programmable problem. Programmable problems can be varied
from simple to very complex. Thus, based on their level of complexity programmable problems
can be classified, but there is no standard classification hierarchy for programmable problems.
Simple programming problem has only one simple functionality to be performed. For an
example think about counting working days of a non-leap year in Sri Lanka. This can be done
easily with one counting function. In this problem you need to consider total number of days
i.e. 365 (assume that we focus only on non-leap years) and the get the number of holidays as
marked in a calendar. Then by using a simple function such as Working days = Total number of
days – number of holidays, the number of working days can easily be computed. You can also
design and develop a user interface using a programming language as given in Figure 01, to
collect required input to perform the counting function mentioned above. It is important to
note that, Total number of days is a constant and it always has the value 365. Hence the
formula can be re-written as Working days = 365 – number of holidays,
2
Figure 01. GUI used for counting working days of a non-leap year system.
According to the given input: number of holidays, the number of working days can be
computed and corresponding output will be displayed. This counting working days of a nonleap year system gave us an idea about what a simple programmable problem should be.
Activity 1.0
Identify input(s), computing function(s) and output for each of the following programmable
problems.
1. Age calculation system - Calculating the age of an individual to the nearest year for a
given birthday.
2. Automated electricity bill computing system for given two meter readings for this
month as last month. Assume that per unit cost is Rs. 24.00
It is important to notice that once the required inputs are collected you need to have only one
single coding line i.e. the counting function in your program. The course objectives of ITE 1942
comprise, number of code lines should be around 500. Thus, you need to focus on identifying
somewhat complicated problem but not a very simple problem as discussed before.
3
What do you think about a real world problem which has several functionalities or tasks to be
performed? Can they be considered as programmable problems? Of course, they are, if tasks or
functionalities can be implemented using a programming language and hence software based
solution can be developed. Let’s have a look at such complicated programmable problem.
Assume that you have been hired as a consultant by a leading Education Institute in Sri Lanka.
They are handling multiple courses e.g. BCS professional Examinations, Association of Chartered
Certified Accountants (ACCA) Examinations. As a consultant you need to work on a project
which focus on developing a software based solution for handing students registrations and
their payment details.
Here, the problem you are going to address as a consultant, is how to handle students’
registrations and their payment details effectively and efficiently. Currently, the education
system follows a manual process which record all details on papers and file them for future
reference. Can we consider this as a programmable problem? Yes, we can, because we can
design and develop a computer based system to handle student’s registrations as well as
payment details. This problem is not as simple as the earlier problem which was focused in
counting working days. There are two major tasks that should be handled by this system. They
are, handling student registrations and handling students’ payment details. For the first task i.e.
handling student’s record, required information including for which programme that the
students are registering for, what are the courses that they taking under the programme, who
are the lecturers/teachers and which classes they are registering for (i.e. whether they are
joining week day classes or week end classes). In the second task, we track who has paid the
course fees and examination fees. Course fees can also be paid in installments. It is important
to notice that each of these two tasks need to have considerable amount of coding as they
contain other sub functionalities/tasks. For e.g. we need to collect registration details of
students and store these details in a database under student registration component.
Moreover, we may need to check whether there are vacant places in the class. Similarly, when
we manage payment records, it is necessary to check the current payment details and update
payment records. More over both tasks share the same information about students. Thus, the
students’ data in the database can be shared. By breaking the whole tasks into sub tasks, we
4
can design and develop a software based solution for handling students’ registrations and their
payment details. Hence, this is programmable problem. Also note that we had a manual
solutions for these problems and we automated almost all of these manual actions via a
software based system.
Currently, we also experiencing very complicated computer based solutions for complex
programmable questions such as intelligence robot who can play the role of office assistant.
Addressing of these type of complex programmable problems is out of the scope of this course.
Now we talk about non-programmable problems.
Non-Programmable problems
Do you think that computer is so powerful to solve any problem in the real world? No, there are
some problem that a computer cannot completely solve. For an example, think about the
problem of reducing the poverty. Can you write a computer program to reduce the poverty?
No, we don’t have an automated solution for the problem of poverty reduction. There are so
many other external factors that are related to poverty reduction beyond the computer system.
Hence this poverty reduction problem is not a programmable problem.
Activity 1.1
1. Name at least three non –programmable problems. Investigate why
they can’t be solved using a computer
Summary
In this lesson we learnt about programmable problems and non-programmable problems.
Moreover, we discussed how complex a programmable problem can be and how to recognize
subtasks/functionalities in programmable problems. In order to demonstrate your knowledge
5
about the concepts attempt the quiz 01. In the next lesson we discuss about the scope of the
programmable problems.
6
Download