New! Hire Essay Assignment Writer Online and Get Flat 20% Discount!!

# SIT105 Critical Thinking and Problem Solving for IT

Published : 25-Aug,2021  |  Views : 10

## Question:

Carefully read all the questions and provide solutions to all four questions.
Word process your solution and convert the whole document to .pdf
Submit your assignment in the assignment submission tool available in Moodle (Week 10).
Late submissions will be penalised. Note: The assignment is marked out of 50 marks but is worth 25 marks i.e. 25% Your assignment will be assessed on how well your solutions have addressed the problem and met the requirements, and on the overall “correctness” of your solutions. Use of appropriate constructs; appropriate messages/error messages; suitable formatting of output; and use of appropriate modularisation techniques are further assessment criteria.

## Answer:

### 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”

### 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 argumentsEnd.

### 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

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

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.

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

## 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.

Get An Awesome Price Quote For Your Paper â€“ Absolutely FREE!

### Our Amazing Features

#### No missing deadline risk

No matter how close the deadline is, you will find quick solutions for your urgent assignments.

#### 100% Plagiarism-free content

All assessments are written by experts based on research and credible sources. It also quality-approved by editors and proofreaders.

#### 500+ subject matter experts

Our team consists of writers and PhD scholars with profound knowledge in their subject of study and deliver A+ quality solution.

#### Covers all subjects

We offer academic help services for a wide array of subjects.

#### Pocket-friendly rate

We care about our students and guarantee the best price in the market to help them avail top academic services that fit any budget.

Getting started with MyEssayAssignmentHelp is FREE

15,000+ happy customers and counting!

Rated 4.7/5 based on
1491 reviews
;