Problem Solving and Critical Thinking: IPO, Pseudo Code, and Charts

Verified

Added on  2019/11/08

|9
|1576
|285
Homework Assignment
AI Summary
This assignment solution delves into critical thinking and problem-solving methodologies, showcasing practical applications through various tasks. The first task utilizes an IPO (Input, Process, Output) chart to illustrate the tax calculation process based on salary input, incorporating conditional statements to determine tax rates. Task 2 presents pseudo code to calculate the average of eleven numbers and count the occurrences of the number six, demonstrating basic algorithmic thinking. Task 3 provides pseudo code to find the average of even numbers within a given positive integer range, emphasizing input validation and loop structures. Finally, Task 4 outlines pseudo code to analyze data input from users, terminating upon a specific value, and then calculating and displaying statistics such as the number of families with zero children, families with more than four children, and the largest number of children in a family, highlighting data processing and conditional logic. A hierarchy chart visually represents the data flow and module dependencies, and the document concludes with a comprehensive bibliography referencing relevant literature on critical thinking and problem-solving.
Document Page
qwertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwertyu
iopasdfghjklzxcvbnmqwertyuiopa
sdfghjklzxcvbnmqwertyuiopasdfg
hjklzxcvbnmqwertyuiopasdfghjkl
zxcvbnmqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzxcvbnm
qwertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwertyu
iopasdfghjklzxcvbnmqwertyuiopa
sdfghjklzxcvbnmqwertyuiopasdfg
hjklzxcvbnmqwertyuiopasdfghjkl
zxcvbnmqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzxcvbnm
qwertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmrtyuiopa
sdfghjklzxcvbnmqwertyuiopasdfg
hjklzxcvbnmqwertyuiopasdfghjkl
zxcvbnmqwertyuiopasdfghjklzxcv
Critical Thinking and problem Solving
IPO chart and Pseudo codes
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Task 1
IPO chart for tax calculation on salary
Input Processing Output
Salary Check if Salary is less than 0 Message to the user “Please
Enter a valid Entry greater
than 0”.
Check if Salary is less than
18200
Message to the user “Your
salary is tax free”.
Check if Salary is more than
18200 but less than 37000.
Calculates tax as per the rate 19c
for each $1 over $18,200
Message to the user “Your
salary is this much, salary,
you have to pay this
calculated tax”
Check if Salary is more than
37000 but less than 80000.
Calculates tax as per the rate
$3,572 plus 32.5c for each $1
over $37,000
Message to the user “Your
salary is this much, salary,
you have to pay this
calculated tax”
Check if Salary is more than
80000 but less than 180000.
Calculates tax as per the rate
$17,547 plus 37c for each $1
over $80,000
Message to the user “Your
salary is this much, salary,
you have to pay this
calculated tax”
Check if Salary is more than
180000.
Calculates tax as per the rate
$54,547 plus 45c for each $1
over $180,000
Message to the user “Your
salary is this much, salary,
you have to pay this
calculated tax”
1 | P a g e
Document Page
Task 2
Pseudo code to print average of eleven numbers and multiple occurrence of number 6
//Calculation Module
Declare an integer array ‘readEleven[]’
Initialize an integer variable ‘count’ with value 0
Initialize an integer variable ‘sum’ with value 0
Declare a float variable ‘average’
//A loop that reads eleven values for the declared array
Begin Loop
Read a value for array readEleven[] until count exceeds 11
If value read is equals to six
Increment value of count by 1
End If
End Loop
//Loop will run eleven times
Begin Loop
Set sum = sum + loop value of readEleven[]
End Loop
Set average = sum/11
Print “The average of eleven numbers is: "+avg
Print “The number 6 occurs "+count+" times
//Testing Module
Create an object to call Calculation Module
Call Calculation Module method with no arguments
End.
2 | P a g e
Document Page
Task 3
A Pseudo Code that takes a positive integer as input and finds the average of all even
between 1 and provided input
//Input Module
Initialize an integer variable ‘limit’ with value 0
Print “Please input a positive integer as the limit”
While the limit is not greater than 0 //While Loop to ensure validation
Read a value for variable limit
If limit is less than or equal to zero //Validation check
Print “Invalid entry: Please enter a positive integer”
//Error Message printed if validation check failed
End If
End While
//Calculation Module
Initialize an integer variable ‘count’ with value 0
Initialize an integer variable ‘sum’ with value 0
Initialize an integer variable ‘i’ with value 1
Declare a float variable ‘average’
// this is a for loop that increments the value of ‘i’ by 1 every time until ‘limit’ has reached
Begin Loop
If (i mod 2 is equal to zero) //checks if number is even or odd
Set sum = sum + i
Set count = count + 1
End If
End Loop
Set average = sum/count
// Output Module
Print “The average of all even numbers is”+ average
// Testing Module
Create an object to call all modules
Call Input Module method with no arguments
Call Calculation Module with ‘limit’ as an argument
3 | P a g e
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Call Display Module with ‘average’ as an argument
End.
Task 4
Pseudo Code to read some data from user and terminated when dummy value 999 entered
and based on data excluding 999 print desired output.
//Input Module
Declare an integer array ‘dataArray[]’
Initialize first array field ‘dataArray[1]’ by value 0
Initialize an integer variable ‘i’ with value 1
Initialize an integer variable ‘count’ with value 0
Print “Enter number of children in different families and type 999 to terminate data input”
//While loop to ensure validation in the code
While value of dataArray[i] subtract 1 is not equal to 999
Read the value for dataArray[i]
Set count = count + 1 //counter increment
If value at dataArray[i] is less than 0 or value is not an integer //Validation Check
Print “Invalid input: Please enter a number which is positive whole integer”
// Error Message printed if validation check failed
Set i=i-1
Set count = count - 1
End If
Set i = i + 1
End While //End of while loop
//Calculation Module
Initialize an integer variable ‘zeroChildren’ with value 0
Initialize an integer variable .moreThanFour’ with value 0
Initialize an integer variable ‘j’ with value 1
//Set the first value of array to variable largest
Initialize an integer variable ‘largest’ with value dataArray[1]
//this is a for loop that increments the value of ‘j’ by 1 every time until count reaches max
Begin Loop
If value at dataArray[j] is equal to zero
4 | P a g e
Document Page
Set zeroChildren = zeroChildren + 1
End If
End Loop
//this is a for loop that increments the value of ‘j’ by 1 every time until count reaches max
Begin Loop
If value at dataArray[j] is greater than four
Set moreThanFour = moreThanFour + 1
End If
End Loop
// this is a for loop that increments the value of ‘j’ by 1 every time until count -1 as this will
exclude the dummy value 999
Begin Loop
If value at dataArray[j] is greater than largest
Set largest = dataArray[j]
End If
End Loop
//Output Module
Print “The numbers of families with no children are: "+ zeroChildren
Print “The numbers of families with more than four children are:" +moreThanFour
Print "The largest number of children existing in any family is: " +largest
//Testing Module
Create an object to call all modules
Call Input Module method with no arguments
Call Calculation Module with dataArray and count as arguments
Call Display Module with zeroChildren, moreThanFour, largest as arguments
End.
5 | P a g e
Document Page
Hierarchy Chart
6 | P a g e
Number of Children in
families Data Report
Initialize variables to
ensure validation and
array to read data
Initialize variables to
calculate and store
output
Read Record
Print the Output
Variables
Validation
check on
record
Calculate no of
families with zero
children
Calculate no of
families with more
than four children
Calculate largest
number of
children existing
in family
Set these
calculated values
in output variables
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Defining Diagram
Input Processing Output
Value 1 Read all the values Display number of families
with zero children
Value 2 If value is invalid display error
message and read value again
Display number of families
with more than four children
Value 3 Calculate numbers of families
with no children
Display largest number of a
children in a family
. Calculate numbers of families
with more than four children
. Calculate largest number of
children that exists in a family
.
Until value=999
7 | P a g e
Document Page
Bibliography
Jonassen, D. (2010). Handbook for learning to solve problems. Routledge.
Browne, M. and Stuart, M. (2006). Asking the Right Questions: A Guide to Critical Thinking.
8th ed. Prentice-Hall, pp.145-151.
Kahane, H. (2015). Logic and Contemporary Rhetoric: The Uses of Reason in Everyday Life. 10
th ed. Wadsworth Publishing Co.
Lutz, W. (2009). The New Doublespeak: Why No One Knows What Anyone's Saying Anymore.
Harper Collins.
Paul, R. (2015). Critical Thinking: How to Prepare Students for a Rapidly Changing World.
Foundation for Critical Thinking.
Radford, B. (2013). Media Mythmakers: How Journalists, Activists, and Advertisers Mislead Us.
Prometheus Books.
Schacter, L. (2011).The Seven Sins of Memory: How the Mind Forgets and Remembers.
Houghton Mifflin Co.
Schick, T. and Lewis, V. (2001). How to Think About Weird Things. 3rd ed. McGraw Hill.
Swanson, D. (2010). Nibbling on Einstein's Brain: The Good, the Bad and the Bogus in Science.
Annick Press.
8 | P a g e
chevron_up_icon
1 out of 9
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]