0% found this document useful (0 votes)
8 views25 pages

Computational Thinking in Programming

.................................................................................................................

Uploaded by

sameersoso87
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)
8 views25 pages

Computational Thinking in Programming

.................................................................................................................

Uploaded by

sameersoso87
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

lOMoARcPSD|61893822

Programming Assignment Exp 1

Digital Technology (City College Norwich)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by soso sameer (sameersoso87@[Link])
lOMoARcPSD|61893822

UNIT 4 – PROGRAMMING ASSIGNMENT A

A1 - COMPUTATIONAL THINKING

‘Computational thinking’ is the term used to describe the use of computers to help us solve
a problem. It does this by using different ways of solving the problem and the way it needs
to be tackled in order to be understood. These can be presented and shown in a way a
computer, a person or both can understand. It’s important that
both the computer and the human know what’s going
on in order for the situation to be understood.

Computational thinking allows us to take a compound


problem, understand what the problem could possibly
be and create a solution if possible.

When looking at computational thinking, we have to


understand that there is 4 main ‘cornerstones’ of
computational thinking, which can be displayed in the
diagram presented on the right. The four cornerstones
are the following.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

CORNERSTONE 1: DECOMPOSITION

‘Decomposition’ is the breaking down of a complex problem or system into smaller and
more manageable parts. If an issue is not decomposed, it is going to be much harder and
complex to solve. Also, dealing with multiple stages all at one time is much
more difficult than breaking down a issue into a number of smaller
problems and solving each one, one by one. Breaking down a problem
into smaller and more manageable parts mean the problem can be
examined in much further detail.

An example of decomposition would be a person mopping the floor. To


decompose this problem, we would need to consider the following
factors:

1. Which mop to use?


2. How long to use the mop for?
3. How hard the person presses the mop on to their floor?
4. What soap or disinfectant the person decides to use?

CORNERSTONE 2: PATTERN RECOGNITION

The next cornerstone is called ‘pattern recognition’. Pattern recognition is the use of looking
for patterns and similarities within a problem. When we decompose (previous cornerstone)
a compound issue, we often discover patterns among the tiny problems and issues we
create. The patterns are similarities or characteristics that some of the problems may share.

Finding patterns is extremely important because patterns make our task we have been given
to complete much simpler. Problems are much simpler to solve when they share patterns
with one another because we can use the same problem-solving solution wherever the
pattern exists.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

CORNERSTONE 3: ABSTRACTION

The third cornerstone is named ‘abstraction’. This is when you focus only on the important
information given, forgetting and ignoring irrelevant detail. Once we have recognised
similarities in our problems, we can use the cornerstone of abstraction
to gather and collect the general features and to pick out the details
we do not need in order to get over our problem. It allows us to
create a basic idea of what the issue is and how to solve the issue.
This idea is known as a ‘model’.

An example of abstraction is the following:

For us to draw a basic and easy cat, we do need to know that it has a tail, fur and eyes.
These characteristics are relevant. We don't need to know what sound a cat makes or that it
likes fish. If we didn’t abstract, the computer and us might think that all cats have long tails
and short fur.

CORNERSTONE 4: ALGORITHMS

The final and last cornerstone of computational thinking is named ‘algorithms’. Algorithms
are plans, which are a set of step-by-step instructions to solve a problem. If we as humans
want our computer to do something, we will have to write a computer program. This will
tell the computer exactly how we what we want to do and exactly how we want to do it.

Algorithms are usually used for the starting point when creating a computer program and
are mostly presented as a flowchart or in pseudocode. Computers are only as good as the
algorithms given to them. If your computer has a bad algorithm, you should expect a bad
result from the computer. Algorithms can be used for multiple things including calculations,
data processing and automation.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

HOW CAN WE USE COMPUTATIONAL THINKING SKILLS


TO HELP SOLVE PROBLEMS?

Computational thinking is important because it basically teaches the leaner of the program
they are using to think as if they were computers themselves, making them much more
intelligent, also like a computer.

This is a small aspect how it solves problems. The four cornerstones are obviously the main
way to solving a problem within programming.

DECOMPOSITION IN CODE PIECES

Firstly, we can use decomposition. Decomposition shortened down is literally breaking


down something into its basic and more simpler parts. With that in mind, that means that it
helps solve problems because it teaches programmers how to become better learners by
cutting down large pieces of information into small chunks. Metaphorically, it’s like cutting
up a large piece of pie into smaller pieces so it’s much easier to eat than eating the whole
pie at once.

When given the pieces of coding such as the clock assembly piece of code,
you can use decomposition to help you solve the problems within the
code. For example, you need to think what you need. So, what does it
need to do? How will it work? What do you want the result to look like? By
breaking the pieces down, it will help to solve problems. Also, the clock
has multiple different functions and ways to preform/ execute the task.
For example, we need to consider decomposing things such as the
pendulum, speed-reduction, the face, showing the reading, changing the
angular speed and more. Also, we need to consider does it connect to the
internet, does it need to be set manually and many more features like sound and vibration
settings. The clock is written in Assembly, which is a low-level programming language.

When given the ‘Snake Game’ piece of code, we can again use
decomposition to help you solve the problems within the code. For
instance, you will need to consider what will it do, how the
character of the snake moves, how big and wide the snake is, what
the background of the game will look like, what the icons of the
apples will look like and when to appear, how big the snake gets

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

once eating a certain amount of apples, the text to show a score, a possible pause menu, a
share score button, and possibly even a home page to the game itself. If we want the game
to be more advanced, we could possibly feature a difficulty setting at the main menu also
which allows you to select how fast the snake moves. This could be put in names as ‘slug’
being the slowest setting, ‘worm’ being the medium setting and ‘python’ being the fasted
setting. Also, we need to consider if it can connect to the internet, vibrate the device being
used when the snake dies and possible sound effects to make the user have a more
enjoyable time playing the game. Snake is written in C++ which is an object-oriented
language and is a further on extension of the usual C language.

Next, when given the ‘Address Book’ we yet again must use decomposition to
allow us not to make as many mistakes as possible. For example, we need to
think about what the text looks like and how large it is, if there are any effects
on the text, what the background of the address book looks like, if you can add
digital profile pictures to the contacts; if you can add other information to
peoples contact such as birthdays, addresses, phone numbers, emails, notes, a
company name, a website and a social media profile. Also, we need to think
about if the address book can feature sounds for notifications, sound effects
when scrolling through, if it connects to the internet or not and if it can be accessed on
multiple different devices or not.

Lastly, we have the ‘Calculator’ that we need to decompose. For example, we need to
consider an on and off button if needed (most likely won’t need), the buttons that multiply,
divide, add, subtract and all the other ones such as square rooting and to the power of x.
Also, we need to have all the different numbers laid out in a way
that the user can easily see, how big the buttons will be, how big
the text will be, the background and colour of the calculator
application, if it produces any sounds when used, the display of
the sum shown and a display showing who’s made the code. If you
want it to be more advanced, you could add different modes to
the calculator piece of code such as a table setting, scientific,
programmer, currency and many more to appeal to a wider
audience of users.

PATTERN RECOGNITION IN CODE PIECES

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

Secondly, we can use pattern recognition. Pattern recognition is when we find order to
something and then analyse the pattern to the logical answer. Then, once students see what
is the same in the problem, they also can look for differences that might help them gain an
answer. It is said that pattern recognition is one of the best ways to teach students learning
programming because it’s easy and natural. Finding patterns are extremely important
because they make our task overall simpler and problems are easier to solve when they
share patterns. An example of pattern recognition in everyday pieces of coding is when an
email system sorts emails into either spam or non-spam. Pattern recognition put short, is
basically looking for things that are the same or very similar within the code to help solve a
problem. It may sometimes turn out that there are no characteristics are among the
problems, but we should still always check.

When given the piece of code such as the clock assembly program, we can use pattern
recognition to help us solve the problems within the code piece. Examples include patterns
such as, the hands on the clock constantly repeating themselves, the integer of the seconds,
minutes, and hours, the numbers on the clock and the date. We look at these because these
are very similar or the same. The numbers on the clock will have to repeat themselves for all
24 hours of the day and the code piece will look similar on some parts.

Secondly, when given the piece of code such as the snake game, we can use
pattern recognition to help us find and solve problems within the code piece.
For instance, the animation of the movement on the snake, the numbers used
when counting scores and the words used when it congratulates you. We look
at these because the movement of the snake will have to repeat its self at
least once throughout the whole time playing the game and the numbers can
present themselves at some points being the same or very similar, which is
exactly what we’re looking for.

Thirdly, when also given the piece of code such as the address book, we can use pattern
recognition to help us solve problems. For example, in the code, there will be patterns with
the names of people, the phone numbers, the towns and cities in the addresses, postcodes
and many more. We can use these examples because these things can be the same if two of
the contacts live in the same house, or very similar, especially with postcodes and phone
numbers if they live in the same area or close by.

Lastly, when given the piece of code such as the calculator, we can yet again use pattern
recognition to help us discover problems within the code. Such as, there will be patterns
with the numbers the user inserts, the buttons they press, and the display shown. We can
use these examples because the numbers will have to be repeated at some stage within
certain calculations.

ABSTRACTION IN CODE PIECES

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

Thirdly, to solve a problem we can use abstraction. Abstraction is taking the differences that
students have discovered in the previous step and then ignoring them because they didn’t
fit the pattern. Abstraction is important because students usually predict that all the
information they have been given in a problem is typically going to be used to solve the
problem, which isn’t necessarily true. So, with that being said, it can be used to solve a
problem.

When given the piece of code such as the clock program, there isn’t a lot we can abstract
from it because the code piece and program is so simple, there’s simply nothing that is
irrelevant or that doesn’t fit the pattern.

Secondly, when given the piece of code such as the snake game again, we can filter out
things that don’t really matter in order for the code piece to still run. Examples of these
include, the colour of the snake, the details of the object being eaten, the background
details and the snake itself. These things in the code would not affect the overall way the
game plays, but it would make the game look a lot worse. The object being eaten could
simply be a back dot or block instead of a detailed red apple, the snake could be a black
rectangle and the background could be plain white. Like said above, this would not affect
the game’s performance, but it would most likely make a user not want to play the snake
game as it looks so dull and boring. We could even have no sounds, because ignoring these
still wouldn’t affect the game’s performance without them.

Thirdly, when given the code piece of the address book, we can filter out things that are not
relevant which can still run without these things in it. This includes notes on the contacts
and the contact’s addresses. But without these, it would be an awful address book.

Lastly, we have the calculator code piece. Mostly, all things included in a calculator are
relevant and are needed to be fully functional. I mean what’s a calculator without numbers
or a multiplication sign? Only thing that could possibly be filtered out is the background
colour if it features one, or the colour of the text.

REPRESENTING PARTS OF A PROBLEM OR SYSTEM

There are multiple different categories of programming languages and they all the ability to
input data from a device such as a keyboard or mouse; output data to a device such as a
computer monitor/screen; process calculations like dividing and multiplying; process
decisions based on specific conditions being met and process repetition for a specific
amount of times, while or until a condition is met.

CONCLUSION OF COMPUTATIONAL THINKING IN CODE PIECES

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

In conclusion to this, Computational thinking allows us to get a complex problem,


understand what the problem is and develop possible solutions. With all these code pieces,
the examples show how all computational thinking skills can apply to them all without even
realising it.

A2 - THE USES OF SOFTWARE APPLICATIONS

Firstly, we need to know, what is a ‘software application’? A


software application, or application software (app for short), is
specific software on a computer designed to perform a group of
functions, activities or tasks, for the benefit of the user. There
are multiple examples of software applications such as,
spreadsheets, word processors, web browsers, media players,
photo editors, etc.

There are multiple different types of application software which includes, utility programs,
generic, integrated, specific and bespoke. Utility programs include virus scanners, disk
defragmenters and backup utilities. Generic includes spreadsheets, PowerPoints, and word
processors. Integrated also includes word processors, spreadsheets and graphics software
but can also contain databases also. Specific includes accountancy software. Lastly, bespoke
is very specific and is written only when a company requires a certain piece of software to
execute a specific task which is very expensive. Examples may include software for shop tills.

We can also use software applications to solve real life problems. There are multiple
examples of when they are used in real life. Firstly, it can enable companies to be able to
test their products in a “real world” sandbox before even beginning to start production.
Secondly, they can be used in education problems such as children not engaging enough
because it can be more entertaining to a student of a young age and help them be more
engaged, hopefully allowing them to intake more information. Thirdly, they can be used to
destroy viruses and malware on a device and prevent serious and important information
from getting in to the wrong hands, solving a very important problem.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

GAMING AND ENTERTAINMENT SYSTEMS

There are also many other uses of software applications. Firstly, we use them with gaming
and entertainment to meet the users needs. For example, they meet user’s needs by having
main menus like the PlayStation and Xbox have where when you load up the console you
are greeted with a welcome asking you what account you would like to login to and are then
presented with a main menu which presents you with all your games, friends, music, photo
galleries and many more which are incredible for a user to experience as it’s simply so
useful. Also, you can choose how your account is laid out, which allows you to choose a
profile picture, a description about you, an avatar, the languages you speak, a
username, a real name and achievements you have earnt whilst playing
the games over the years you have collected. The PlayStation and
Xbox also feature backgrounds to entertain and look attractive to
the user which normally feature a stunning visual accompanied by
beautiful sound effects and music. Although, there are some
implications to entertain systems such as becoming addicted, weight
problems, and becoming distant from reality; some have even argued
that they make people have mental health problems and could be linked
to major crimes such as mass shootings, but no evidence has confirmed
this.

PRODUCTIVITY

Secondly, we use them with productivity to meet the user’s needs. For instance, they meet
users needs by having icons that you can use to help you complete certain tasks such as,
paste buttons, save buttons, new slide button, certain text modifier options, insert icons, cut
tool, image arranging tools and many more. Also, they appeal to users by having interesting
backgrounds and sharp looking interfaces with detailed graphics to make users know what
application they are using and to make them want to use it again. Examples include
Microsoft applications like PowerPoint, Adobe applications like Photoshop and Google
applications like Google Docs. They also feature a start-up ‘main menu’ which allows users
to select what kind of document they want to start whether that be a
certain background or style. All these examples also allow you to
create an account for the application which needs a
username, email, password, a profile picture if you want
which can also make the application look that little bit
smarter. These applications, PowerPoint the most, are
brilliant for presenting work and presentations to people at work or students at
school. However, there are some implications of productivity applications. For
example, they are usually quite expensive and can be sometimes slow.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

SOCIAL MEDIA

Thirdly, we use them with social media to meet the user’s needs. For example, they meet
user’s needs by having a profile that you can add a profile picture to, a bio, a website, a
username, a real-life name, and occasionally, a cover photo also (example such as Twitter
and Facebook). Also, they have ‘main-menus’ almost but is instead called a ‘feed’ which is
when all posts, usually most recent, come up on your ‘wall’ which is usually decorated with
smart colours and attractive images and icons. Social media features multiple different
things such as a messenger service, a profile, a like system which draws users (and in some
cases become addicted), a follower system, a comment system, a location system, and many
more. Social media now a days is used mainly to follow friends and family and celebrities
you have a personal interest in that usually post about their day to day lives. Although there
is implications of social media, for example, people can become fake meaning they only post
things that they want other people
want to see. Also, social media can be
talked as ‘addictive’ as people become
obsessed with popularity and how
many likes and followers they’re
receiving.

SEARCH ENGINES

Another example we use them with search engines to meet the user’s needs. For instance,
they meet user’s needs by having a large attractive logo so that the user knows exactly what
website and search engine they are using; they have a search bar which allows a user to
type anything they like into which then everything the search engine can find is pulled up.
Also, they present the user with multiple different pieces of information that may be
relevant to that topic, they show how many pieces of information were found when
searching that topic in how many seconds (for example 1,220,000,000 results in 0.48
seconds when ‘hello’ is inserted) and it also allows users change which language they would
like the information in. Advanced search engines have not just information, meaning you
can search for information, videos, images, places on maps, news, shopping websites and
many more. Although, there are of course implications of using search engines. For
example, you need to be very specific in some cases when selecting certain keywords as
there are billions of webpages and searches may not be arranged in relevant order because
companies can pay for their web links to be the top of the page or higher up than other
pages.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

INFORMATION STORAGE AND MANAGEMENT

One more example we use them with is information storage and management to meet the
user’s needs. They meet the user’s needs by working as a complete and comprehensive
system expanding to all interconnecting sub-systems.

REPETITIVE AND DANGEROUS TASKS

Software applications can also be used for repetitive or dangerous tasks for example, using
robots in a nuclear reactor, bomb disposal and repetitive tasks such as sorting sizes
of potatoes for packing and sealing lids on cans. Although there are many
advantages and disadvantages when using software applications in robots and
in the workplace. Advantages include that it’s quick, much more professional
and easier to find. Disadvantages include that they can become extremely
dirty unlike humans, they cost a lot to purchase and they can be easily
destroyed. Also, normal software which is not robots can easily glitch
and mess up an important task such as if something goes wrong in a
nuclear reactor it can cause massive disasters and devastation.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

A3 - FEATURES AND CHARACTERISTICS OF


PROGRAMMING LANGUAGES

When talking about programming, it can be sorted into two different main languages. These
are called ‘Low-level languages’ and ‘High-level languages’.

LOW-LEVEL LANGUAGES

Low-level languages are considered the harder programming languages to use because they
usually provide little or possibly no abstraction at all from a computer’s instruction set
architecture. Generally, this refers to either machine code and assembly language. Low-level
languages were developed first before high-level languages. Low-level languages are much
faster than high-level languages and has super performance but is extremely hard to write.
Also, they have few support and are hard to start and learn low-level. Main examples of
low-level languages include, 360 assembler, PDP-10 assembler, Intel x86 assembler and
many more. Some people have even considered C language now to be a low-level language.

HIGH-LEVEL LANGUAGES

High-level languages are considered the easier programming languages to use because they
are easier to understand and learn and are usually used for beginners who are new to
programming and code. High-level languages have been considered to have poor
performance but, yet they have flexible syntax, easy to read, is object oriented, functional
and unlike low-level languages they have a large community meaning they have more
support when needed. The first high-level languages were first designed in the 1950’s. It is
considered easy because it is a programming language with strong abstraction from the
details of the computer. High-level languages are closer to human languages and further
from machine languages unlike low-level languages. Examples of high-level languages
include FORTRAN, Java, Pascal, C++, and BASIC.

PROCEDURAL PROGRAMMING

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

Procedural programming is known as a programming paradigm, a type of computer


programming language that specifies a series of well-developed procedures within its
programming context to compose a certain program. It contains a systematic order of
statements, commands and functions to solve a computational program or task. Procedural
programming gets its name from allowing sub-sequences of defined instructions be put into
groups into labelled procedures. Examples of procedural programming languages are C,
Perl, FORTRAN, Pascal and Python. Procedural is apparently the fastest programming
language that has the highest performance (other than machine code).

OBJECT-ORIENTED PROGRAMMING

Object-oriented programming is a programming language model created around objects


rather than actions and data rather than logic. It is mainly a programming paradigm based
on the idea of objects which may contain data. Examples of object-oriented programming
include C++, C#, and Java.

EVENT-DRIVEN PROGRAMMING

Event-driven programming is a programming paradigm which the flow of the program is


determined by events such as sensor outputs, user actions or messages from other
programs. Examples of event-driven programming include things like Visual Basic.

MACHINE PROGRAMMING

Machine code is a program on a computer or device created using machine language that
can be executed by a computer’s central processing unit. Machine code is considered the
fastest and has the highest performance out of all the programming languages.

MARK-UP PROGRAMMING

Mark-up languages are created for the definition, processing and presentation of text. An
example of mark-up language is the widely known HTML. There are many different mark-up
languages and for web design and development there are three main mark-up languages
which are named HTML (as said above), XML, and XHTML.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

A4 - CONSTRUCTS AND TECHNIQUES AND THEIR


IMPLEMENTATION IN DIFFERENT LANGUAGES

COMMAND WORDS

Command words are instructions given by a user asking for a computer to do a certain thing
for them. Commands are usually issued by typing them in at the command line and then
pressing the enter button, which puts them to the shell. Command words are simply typed
in using a keyboard. They are usually special keywords that a program understands, function
keys, choices in a menu, or buttons or other graphical objects on your screen. Examples of
command words are, 20 PRINT “Hello, world!” or 90 PRINT “this is my answer.”

DATA TYPES

There are multiple data types when looking into programming. In computing, a data type is
a classification of data which shows the complier or interpreter how the programmer wants
to use the data given. Most programming languages support multiple types of data for
example, real, integer or Boolean. A String is a sequence of characters, for example “Hello,
World!” A string can be any text inside quotes and you can use single or double quotes. An
integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647.
There are some rules for integers which include the following: a integer must have at least
one digit, and it must not have a decimal point. An
example of an integer is having $x = 5985. Next, is a
float, which is a number with a decimal point or a
number in exponential form. An example of a float in
a piece of code is when $x = 10.983. Another data
type is a Boolean which represents two possible
states such as true and false. We could express it in
code as it being $x = true and $y = false. Also, we
have a real data type which is a data type used in a
computer program to show an approximation of a
real number. Because the numbers are not
countable, computers can’t represent them exactly
using a limited amount of information.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

CONSTANTS AND VARIABLES, LOCAL AND GLOBAL VARIABLES

In a program, data values can be constants or a variable. If values are variable they could be
altered by the program or the user. When a program runs, the data values are kept in
memory whilst they are being worked on. Constants are data values that stay the same
every single time a program is executed. Constants are not expected to change. There are
different types of constants such as literal constants and named constants. Literal constants
are actual values fixed into the source code. For instance, an example of this could be the
character string “hello world” because the data value of this has been fixed into the code.
Named constants are values that a name is defined to be used instead if a literal constant. A
possible example of this could be saying that the starting level of a game is always preferred
to be called level 1.

Variables are data values that can easily change when the user
is asked a question, for example, how old they might be.
Variables can change during a program execution. A variable
can be described as a ‘memory location’ because it has a name
that is related with that location. The memory location is then
used to hold certain data. Local variables only can work in the
loop, class or procedure they were made in. Global variables can be found from any point in
a program.

STATEMENTS

When looking at programming, a ‘statement’ is a syntactic unit of an imperative


programming language that shows some kind of action to be carried out. A program created
and written in that certain language is created by a sequence of one or more statements.
There are different types of statements and these are called, assignment, input and output,
sequence, iteration and selection. An assignment statement sets or resets the
value kept in the storage place denoted by a variable name, basically meaning it
copies a value into the variable. An input or output statement is a bit of a
program that tells a computer how to read and process information. A
sequence statement specifies a storage sequence for objects of a derived type.
It can only be seen within a derived type definition. Iteration statements allow embedded
statements to be executed a certain amount of times and these statements are executed in
order, apart from when a jump statement is in view. Iteration is basically the meaning of the
act of repeating something. An example I found of iteration statements from the internet is
“7th grade8th grade9th gradeMiddle SchoolHigh SchoolCollege”. And lastly, selection
statements are statements that cause the program control to be moved to a certain flow
based upon whether a specific condition is true or false.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

LOGICAL OPERATIONS

An operator in a programming language when looking at computer science is a symbol that


lets the computer know that it needs to perform a certain mathematical, logical or relational
operation and produce a final result. For example, the operator of + adds two operands and
will end up with the end result having A + B will give you 30.

SUBROUTINES, FUNCTIONS AND PROCEDURES

A subroutine is a sequence of program instructions that complete a certain task, packaged


as a ‘unit’. A unit can be used in programs where that specific task should be performed.
Functions are types of procedures or routines. Most programming languages have a
prewritten set of functions built in with it that are kept in a library. Also, you can write your
own functions to complete specialized tasks. The word function is also used with command
and operation meaning that you can execute the delete function to completely delete a
word. A procedure is several coded instructions that show a computer how to run a
program or calculation. Multiple different types of programming languages can be used to
create a procedure. And this all comes down to depending on the program, a procedure
may also be named a subprogram, subroutine and a function.

STRING HANDLING

String handling is the power to manipulate and change names, addresses, text and more
which is called ‘alphanumeric data’. Normal functions include the power to control arrays of
strings, to the right and left align and centre strings and to search for an occurrence of text
within a string. Most programming languages have a data type named a string, mostly used
for data values that are created up of ordered sequences of characters, again the most
common example is “hello world”, as mentioned above in the data types section. A string
could have any sequence of characters, invisible or visible, and these characters may be
repeated. The length of the string is the number of characters in the string, for example
“hello world” has length 11 – made from 10 letters and 1 space. There is also
such thing as an empty string. This contains no characters at all with a
length of 0.
Also, we should mention ‘substrings’ which are contiguous sequences of
characters within a string. For example, “the sickest time” is a substring
of “It was the sickest time we’ve ever had”.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

ARRAYS

An array is a selection of memory locations or boxes which holds a single part of data, but
with each box sharing the same name. Data in an array must all be the same data type.

Two-dimensional arrays are similar to a one-dimensional array, but instead it can be shown
as a grid or table with rows and columns. A 9 by 9 two-dimensional array could be declared
with a statement such as “game [9] [9]”. Many games use 2D arrays to plot the visual
environment and world of the game. Many games such as Minecraft go further using three-
dimensional arrays to build an in game environment for the game. Simply put, a 3D array is
an array of arrays of arrays. You can also split up ad merge arrays when you need. For
example, you can have a three-item array of different fruits and want to have a subarray
consisting of the last two items. You could do this with the array_slice function, passing it
the array you want to get a section of, in which you get the offset at which to start and the
length of the array you want to build.

FILE HANDLING

File handling basically means reading writing files. As an example, you have the names of
farmers employed on your farm and you want to sort their names into alphabetical order.
From the programming point of view you would read the farmer’s text file and store those
names in an array of strings. Secondly, you would sort them with any algorithm. Then
thirdly, you would write that sorted array into another farmers sorted text. File handling can
mean multiple things though, and could also mean the process which a software handles it’s
output and input operations with text or binary files.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

DATA STRUCTURES

A data structure is a data organisation, storage and management format that allows
efficient access and modification. It’s mainly a collection of data values, the relationships
within them, and the operations and functions that can be applied to the data. We use data
structures for multiple different kinds of applications but some of data structures are very
specialized to certain tasks. An example of a data structure is a record, which is an aggregate
data structure.

EVENT HANDLING

Event handling is basically a type of software routine that processes actions such as
keystrokes and mouse movements. In other words, it’s a routine that is used to deal with an
event, allowing a programmer to create code that will be executed when the event
happens.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

A5 – PRINCIPLES OF LOGIC APPLIED TO PROGRAM


DESIGN

ITERATION

Iteration is the idea and process of looping and repeating sections of a program. There are
two types of iteration, and these are called ‘count-
controlled’ and ‘condition-controlled’. Count-controlled
loops repeat the same steps a certain amount of times,
regardless of the end product. A condition-controlled
loop will keep repeating the steps repeatedly until it has
a specific result. Iteration is important because it allows
programmers to simplify algorithms by saying that we
will repeat specific steps until told otherwise. This allows
designing algorithms quicker and simpler because they
don’t have to include lots of unneeded steps. So, all this
put simply, iteration is basically just the process of
repeating steps.

THE USES OF SETS

The true purpose of ‘sets’ is to keep a collection of related objects. They are important
because every field of mathematics uses, or references sets in some way or another. They
are also important because they can be used for building more complex mathematical
structure.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

A6 – QUALITY OF SOFTWARE APPLICATIONS

EFFICIENCY AND PERFORMANCE

Software applications have multiple different effects on efficiency and performance on a


device, whether that’s a computer through to a smart phone. Software applications when
installed to a device will alter the device’s memory space in the hard drive. This is because it
needs memory to be installed on to the device and it takes this from the main storage hub
of the device, this being the hard drive. The more software applications installed on your
device, the slower your device will run and it also means you won’t be able to install many
more because your hard drive will get full. This may also effect the CPU Cycles, which is the
speed of a computer processor, which is determined by a clock cycle. Software applications
slow down the CPU performance because all programs and files from the software
applications are saved onto the hard drive, which the CPU needs to read when the programs
are opened.

MAINTAINABILITY

Maintainability in software applications pretty much means how easy it is for a software
system or component to be modified to correct problems, make performance better or
other features, or change to a new environment. Put much simpler, it’s how easy it is for a
program to be modified by its present or future developer.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

PORTABILITY

With portability in mind, software applications can vary in whether they are portable and
flexible or not. Some software applications can only be accessed on computers where you
can login to your account which has already been paid for, but has a lock restricting you
from using it on more than 5 devices or so. An example of this, is the Microsoft Office
package, which allows you to use it’s software applications on any device, as long as you
have paid for your subscription and that there has been less than say 5 devices used
already. Other software applications can be accessed on any device with Wi-Fi and have no
device quantity restrictions and are free to use. An example of this, is Google software
applications on Google Drive which can be accessed on any device by creating a Gmail
account. So when looking at these examples, Google’s software applications are far better
for portability than Microsoft’s software applications. However, Microsoft sometimes allows
documents to be viewed even when you don’t have a subscription with them, but this
means you can only view the document and not edit it.

RELIABILTY

When looking at the quality of software applications, we should consider the thought of
reliability. We should think about this because reliability is a large part on
judging something on how good it is. For example, in software
applications, not all applications are reliable as they can crash
unexpectedly. With some applications, this can result in the loss of
the work you were working on and this might be considered very
important work. Although, sometimes, some applications have a
back-up feature just in case things like this happen, meaning you
can retrieve your files even if they are accidently deleted or corrupted.
Another factor to consider when thinking about reliability is the accuracy of the
application. If the application isn’t accurate and doesn’t have all the things you
need to use, it’s not going to be reliable.

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

ROBUSTNESS

Robustness mainly consists of how strong the application is, basically meaning the
quality of its coding. If a software application is robust, it will have a high quality of
coding and testing to ensure that the application doesn’t suddenly crash
unexpectedly on users. If a application has poor quality of coding and testing,
the application is more likely to crash for users using it. Applications usually
crash due to extreme and erroneous data, but this can be avoided if you have
a high quality of coding and testing. Testing an application is an all-around
good thing to do anyway because it ensures that the software is suitable for
users and is not going to not work correctly.

USABILITY

Usability is basically how easy to use and how easy it is to learn of a


human-made object or device. If the software is not easy to use,
people are less likely to want to use that software application,
which could even result in the user switching to using another
application that is easier to use. If the software application has
good usability, the user will be satisfied with the software, will
want to use it again, and will recommend the software to others.
This is important because it will expand the application software
further across the world and help it sell. Examples of a software
application with good user usability is having features such as help
options if needed, visible buttons which are not hidden, and an easy
to use interface. An example of these used is on the software application Microsoft Word.
Microsoft’s software applications such as Word, PowerPoint, and Excel all have extremely
good usability.

REFERENCES

Most of the work completed on this document is completely my own, and if not, is mostly in
my own words. Some of the information is like the work on the internet that I have

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

researched. In this document, I have tried my hardest to stick to my own words, but there
may be an occasional part of the documents which are the same as on the internet. My
work features both pictures and researched text.

IMAGES

 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
[Link]
 [Link]
sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwi3vIimjZLeAhUDQRoKHSyTAqEQjRx6BAgBE
AU&url=http%3A%2F%[Link]%2Fimg%2Felectronics%2Fjoysticks%2Fxbox-360-
controller-clipart&psig=AOvVaw01PCaFibuSr8-h-3Jupwt9&ust=1540024563743771
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
index/DK_illos_jess_Create_Insight_Statements_Transparent_575.png?1429660332
 [Link]
 [Link]
safe-clipart-transparent_600-[Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]

INFORMATION

 [Link]
 [Link]
 [Link]
courses/BCC02946/Unit%[Link]
 [Link]
cmd=view&content_id=_835476_1&course_id=_46887_1&framesetWrapped=true
 [Link]
course_id=_46887_1&content_id=_835469_1
 [Link]

Downloaded by soso sameer (sameersoso87@[Link])


lOMoARcPSD|61893822

 [Link]
GB&biw=958&bih=928&ei=8ZrJW4vDB9S_gQaJ3oqQCA&q=data+structures&oq=dat
a+structures&gs_l=psy-
ab.3..0l10.19195.22964.0.23112.[Link].[Link].9.9.0....0...[Link]-
ab..0.15.660...0i131k1j0i67k1j0i131i67k1.0.45mlQoQyuIA
 [Link]
 [Link]
GB&biw=958&bih=928&ei=o5vJW4OwJJO0gQaFgL7oBg&q=subroutines+functions+a
nd+procedures&oq=subroutines%2C+functions+and&gs_l=psy-
ab.1.0.0j0i22i30k1l9.5142.11700.0.13038.[Link].4.0.132.1833.23j1.24.0....0...1c.1
.[Link]-ab..0.30.1856...0i67k1j0i131k1j0i131i67k1j0i10k1.0.e_Flil01430
 [Link]
GB&biw=958&bih=928&ei=65vJW6jwF4qugQbCwaioCg&q=statements+programmin
g&oq=statements+pro&gs_l=psy-
ab.1.0.0l3j0i22i30k1l7.4052.5993.0.7914.[Link].[Link].5.5.0....0...[Link]-
ab..0.6.408...0i67k1.0.MhrKkRq5OFU
 [Link]
 [Link]
 [Link]
GB&q=markup+programming&spell=1&sa=X&ved=0ahUKEwjhsd_dkZLeAhXKD8AKHf
K0BM4QBQgoKAA&biw=958&bih=928
 [Link]
 [Link]
 [Link]
 [Link]
highest-performance-other-than-machine-code

Downloaded by soso sameer (sameersoso87@[Link])

You might also like