0% found this document useful (0 votes)
54 views4 pages

2.1.4. Thinking Logically

Uploaded by

F J
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)
54 views4 pages

2.1.4. Thinking Logically

Uploaded by

F J
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/ 4

OCR Computer Science A Level

2.1.4 Thinking Logically


Advanced Notes

www.pmt.education
Specification

2.1.4 a)

● Identify the points in a solution where a decision has to be taken.

2.1.4 b)

● Determine the logical conditions that affect the outcome of a decision.

2.1.4 c)

● Determine how decisions affect flow through a program.

www.pmt.education
Decision making in problem solving

A ​decision ​is a​ result reached after some consideration​.


When solving problems and designing programs, many
decisions have to be made. One of the first and biggest
decisions that is made is choosing the approach or ​paradigm
used when developing a piece of software. Another example
of decision making within software development is deciding
how different pieces of information are collected.

Imagine you were set the task of building a program which


switches on a light when a button is pressed. What questions come to mind?
- Which programming paradigm will I use?
- Which programming language will I use?
- What input devices will I need?
- What output devices will I need?
- How can I interact with these devices?

To answer each of these questions, decisions have to be made. To simplify the decision
making process, we begin by trying to​ limit the possible solutions​ we can pick from. When
deciding on a programming language, for example, you should first consider which
programming languages it is ​feasible ​for you to use. This decision should be based on the
language’s suitability to the problem you are solving and whether it provides enough
functionality to solve the problem. It is also important to consider which languages you are
comfortable with using, or how easy it is to learn a new language given time constraints.

It is important for us to try and identify where decisions will need to be made when building
our solutions, as this allows us to gather enough information about our options. This
enables for an informed decision to be made.

When drawing​ flow charts​, a decision is usually shown by a diamond shaped icon. This
can have two results, yes or no (​true/false​).

www.pmt.education
Conditions that affect the outcome of a decision

When you make a decision, there are certain factors which ultimately determine the
outcome you choose. There are several key factors that you should take into account:
- What is most effective?
- What is most convenient?
- Is this option reasonable?

To make an appropriate decision, you need to ​evaluate these conditions​ and order them
from most important to least important. Once you have done this, it becomes easier to pick
the best option for your solution. By prioritising either effectiveness, convenience or
feasibility, it should become clearer what sort of approach is best for achieving your
solution. This might vary depending on the purpose and end-users of the software.

Decisions affecting the flow of a program

Decisions are made to determine how different parts


of the program are completed. Say we are tasked
with designing a simple runner game. We could
design the game to be endless, or make the game
level-based.

Again, we would evaluate these conditions using the


methods described above. It is important to
understand that both decisions produce completely
different results, and therefore produce different
routes through the program.

Thinking logically also involves identifying where decisions need to be made by the user
within the program, and planning out the outcomes of the decision made. The program will
follow a different route depending on the decision made by the user.

Putting it all together:


Thinking logically allows you to plan and prepare for different scenarios, as it provides a
foresight of the decisions made through the whole program. Decision making is one of the
most important aspects of ​problem solving​; good decision making is the key to solving
problems ​effectively​.

www.pmt.education

You might also like