ProductsLogo
LogoStudy Documents
LogoAI Grader
LogoAI Answer
LogoAI Code Checker
LogoPlagiarism Checker
LogoAI Paraphraser
LogoAI Quiz
LogoAI Detector
PricingBlogAbout Us
logo

SIT105 Assignment 2 Trimester 2 2017

Verified

Added on  2019/10/31

|4
|541
|179
Project
AI Summary
The assignment content is about critical thinking and problem-solving for IT, comprising of five sections: Defining Diagram, Solution, Algorithm, Hierarchy Chart, and None. The main topics covered include calculating tax based on annual salary, finding the average of an array of numbers, calculating the average of even numbers up to a given number P, and analyzing family data including the number of children and maximum value.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
SIT105 Critical Thinking and Problem Solving for IT Assignment 2 Trimester 2 2017
Name:
ID:

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1. Defining Diagram
Input Processing Output
annualSalary Input annualSalary annualSalary
If annualSalary <=0 then
Print error
Input annualSalary again
If annualSalary <= 18200 then
Tax = 0
If annualSalary <= 37000 then
Tax = (annualSalary – 18200) * 0.19
If annualSalary <= 80000 then
Tax = 3572 + (annualSalary – 37000)*0.325
tax
If annualSalary <= 180000 then
Tax = 17547 + (annualSalary – 80000)*0.37
If annualSalary >= 180001 then
Tax = 54547 + (annualSalary – 180000)*0.45
Print annualSalary and tax
2. Algorithm
Declare an array A with size 11 //array to store the 11 numbers
For i=0 to 11: //loop to input all no’s in array
Input A[i] //Input number
Declare avg = 0 //variable to store the average
Declare count = 0 //variable to store the count of 6
For i=0 to 11: //loop to check each number
avg = avg + A[i] //add each number to avg
IF A[i] = 6 then: //if number is 6
count = count + 1 //increment count
avg = avg/11 //avg is total divide by 11
PRINT avg and count //Print the values
3. Algorithm
DEFINE calculate(P): //function to calculate average
Declare total = 0 //variable for total of all even no.s
Declare count = 0 //variable for count of even nos
For i= 2 to P: //loop to check each even no
IF i%2 = 0 then: //if number is even
total = total + i //add number to total
count = count + 1 //increment count
Declare avg = total/count //avg is total divide by count
RETURN avg //return average to calling func
Document Page
END
MAIN function:
Input P //Input p
While P <=0: //loop for error if p is negative
Print error message
Input P
avg = CALL calculate(P) //Call calculate method for avg
Print avg //print avg on screen
4.
i. Algorithm
Main function:
Declare max = 0 //variable to store the max value
Declare noChildren = 0 //variable to store the no children count
Declare moreThan4 = 0 //variable to store the more than 4 count
Do: //loop to input no
Input n //Input no
IF n >=0 and n!=999 then: //if no is greater than 0 and not equal 999
IF n = 0 then: //if family has no children
noChildren++ //increment noChildren
IF n >4 then: //if family has more than 4 children
moreThan4++ //increment moreThan4
IF max<n then: //if max is less than n
Max = n //update max
While n!=999 //loop while user enters 999
Print noChildren, moreThan4 and max
ii. Hierarchy Chart
Document Page
iii. Defining Diagram
Input Processing Output
all numbers For all numbers: noChildren
If num = 0 then
noChildren++
If num > 4 then
moreThan4++
moreThan4
If max > num then
Max = num
Max
1 out of 4
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]