Академический Документы
Профессиональный Документы
Культура Документы
Information Technology
and hi to everyone else as well
Lecture Outline
• The Bachelor of IT & where this subject fits in
• Why learn Problem Solving?
• What is Problem Solving?
• How to analyse a problem
• Problem Decomposition
• Communicating a Solution
Typical BIT outline
Programming strand
Minors
Programming strand
Other strands/ connections
Networking
Design Thinking
CP1401 – Introduction to
Problem Solving
(and Programming)
Why Problem Solving?
• Who uses problem solving?
– Everyone!
• Business
– How do we meet a new need?
– How do we compete/improve our market share?
– How do we market a new product?
• Education
– How do we teach new ideas?
– How do we build on existing knowledge?
• IT
– How do we fix it? (Have you turned it off and on again?)
– How do we fix this program? Can we just write our own?
Problem Solving and Programming
• Traditional approach:
– Blend both together, side by side
– Taught together
Problem Solving
Programming
Concepts First
Programing
Language
Programming Syntax
The problem with the traditional approach
First
Programming
Language
Programming
Concepts
Problem Solving
Skills
Onwards and upwards
Mobile
Computing Advanced
Game Design Software
Programing II Engineering
Design
Programing I
Thinking
Problem Solving
CLASS ACTIVITY! (this means you )
My Life Story
The Story of my Life
For this exercise:
• Get into groups of 2 people
• If necessary there can be one group of 3
• Each person will need:
• A sheet of coloured paper
• The instruction sheet
• A pen/pencil
• Follow the instructions and ask if you have any
questions
What is Problem Solving?
• How do we do it?
• General Purpose
– Applicable to any domain
Basic Programming Approach
Analyse the Programming
problem
Design a
solution
Check the
solution
Implement
the solution
Test the
Problem Solving implementation
DONE!
• Nouns:
– box, dimensions, length, width, depth, volume
• Elimination (which ones are unnecessary?)
– box, dimensions, length, width, depth, volume
Decomposition
• ‘Things’ in our problem:
– length, width, depth, volume
Step 2 – What do we need to do?
We need to know how much a box can hold,
assuming that we have been given its
dimensions. We have been given the length,
width and depth of the box, and we need to
calculate the volume of the box.
What are the verbs?
Decomposition
We need to know how much a box can hold,
assuming that we have been given its
dimensions. We have been given the length,
width and depth of the box, and we need to
calculate the volume of the box.
• Things to do – ‘calculate the volume’
• Things - length, width, depth, volume
• So we need to calculate volume from length
width and depth
• volume = length X width X height
CLASS ACTIVITY! (this means you )
Your boss has asked you to make the hiring decision for a new employee in your
department. The two short-listed candidates seem to be equally suited for the role.
How will you decide which person will get the job?
You and a group of friends are going to have dinner and then see a movie. You have 3
different options for where to eat, and two choices of cinema. One cinema has better
facilities and is nicer, but is not showing a movie that some of the group want to see.
Of the three restaurants one is halfway between both cinemas, one is very close to the
first cinema and one is very close to the second. How will the group decide where to
eat and which cinema to go to?
How to communicate a solution?
• Option One – Wall of text
Get the length, width and depth of the box. Once
that is done then calculate the volume of the box by
multiplying the length by the width by the depth.
Then display the volume of the box.
• We can do better
– Algorithm – new vocabulary word
• Step-by-step explanation of the solution
– Cooking recipes, directions and instructions for almost
anything are all algorithms
Algorithm
• General purpose
– used in business, IT, everywhere
– Start/Finish
– Get/Display information
– Do some calculations
– Make a decision
– Start/Finish
– Get/Display information
– Do some calculations
Volume of a box
Start
This is the same To improve this we could
‘solution’ as in our add some decisions…
Get length,
earlier algorithm: width and
height
Are there limits on these
Get length, width and depth
values? (can they be less
Calculate volume = length X Calculate: than one)
width X depth volume = length X
width X height What do we do if we are
Display volume
given illogical (or
impossible) numbers?
Show
volume
More on this next week
Finish
CLASS ACTIVITY! (this means you )