Assignment on Critical Thinking and Problem Solving for IT - SIT105

Verified

Added on  2019/10/30

|8
|830
|314
Homework Assignment
AI Summary
This document presents a comprehensive solution to a SIT105 assignment focusing on critical thinking and problem-solving in IT. It includes detailed answers to several questions, such as defining diagrams that illustrate input, processing, and output for different scenarios, including a tax calculation example. The assignment provides pseudocode for calculating averages, counting specific values, and identifying even numbers. The solution also demonstrates modularization techniques, breaking down complex problems into smaller, manageable sub-modules. Additionally, it addresses potential error messages and provides a counting sample algorithm with modularization, defining diagrams, and a hierarchy chart. The assignment covers various aspects of computational thinking, including algorithm design, data structures, and error handling, which are essential for IT professionals. This solution is designed to help students understand and apply critical thinking and problem-solving skills within the context of IT-related challenges.
Document Page
Running head: CRITICAL THINKING AND PROBLEM SOLVING FOR IT
SIT105 Critical Thinking and Problem Solving for IT
Name of the Student:
Name of the University:
Author Note
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
1
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
Answer to question 1
Defining Diagram
Input Processing Output
INPUT DATA IF DATA >= 0 AND
DATA<= 18200
NIL
IF DATA >= 18201 AND
DATA<= 37,000
19C FOR EACH $1 OVER
$18,200
IF DATA >= 37001 AND
DATA<= 80000
$3,572 PLUS 32.5C FOR
EACH $1 OVER $37,000
IF DATA >= 80001 AND
DATA<= 180000
$17,547 PLUS 37C FOR
EACH $1 OVER $80,000
IF DATA >= 180001 $54,547 PLUS 45C FOR
EACH $1 OVER $180,000
Answer to question 2
AVERAGE_OF_NUMBERS
count = 0
sum = 0
DO I = 0 to 11
READ n [I]
I = I + 1
Document Page
2
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
ENDDO
DOWHILE I < 11
sum = sum + n [I]
I = I + 1
ENDDO
DO I = 0 to 11
DOWHILE n [I] = 6
count = count + 1
ENDDO
I = I + 1
ENDDO
Average = Sum / 11
PRINT Average
PRINT count
END
Answer to question 3
EVEN_NUMBER
READ P //Input P
Document Page
3
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
SUM = 0 //Initialize Sum to 0
DO 1 to P //For Loop
IF P%2 = 0
SUM = SUM + P
ENDIF
ENDDO //End For
Average = SUM / P
PRINT Average //Print Answer
END
Modularization
Main module Sub module
EVEN_NUMBER
READ P
SUM = 0
AVG (P)
PRINT Average
END
AVG (READ A)
DO 1 to A
IF A%2 = 0
SUM = SUM + A
ENDIF
ENDDO
Average = SUM / A
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
4
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
Error Messages
Error messages would be encountered if the value of P entered by the user is negative.
“Please enter an appropriate value” would be displayed by the system.
Answer to question 4
COUNTING_SAMPLE
READ P //Input the value of P
COUNT1 = 0 //Initializing the values
COUNT2 = 0
COUNT3 = 0
DO I = 0 TO P //For Loop
READ N [I]
I = I + 1
ENDDO
DO I = 0 TO P
IF n [I] = 0
COUNT1 = COUNT1 + 1
ELSEIF n [I] > 4
COUNT2 = COUNT2 + 1
Document Page
5
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
ENDIF
I = I + 1
ENDDO
COUNT3 = n [0]
DO I = 0 TO P
IF COUNT3 > n [I]
COUNT3 = COUNT3
ELSE
COUNT3 = N [I]
ENDIF
ENDDO
PRINT COUNT1 // The number of families with no children
PRINT COUNT2 // The number of families who have more than 4 children
PRINT COUNT3 // The largest number of children existing in any family
END
Modularization
Main module Sub module
COUNTING_SAMPLE ZERO_MEMBER (READ N[I], READ P)
Document Page
6
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
READ P
COUNT1 = 0
COUNT2 = 0
COUNT3 = 0
DO I = 0 TO P
READ N [I]
I = I + 1
ENDDO
ZERO_MEMBER (N[I], P)
MAX_MEMBER (N[I], P)
PRINT COUNT1
PRINT COUNT2
PRINT COUNT3
END
DO I = 0 TO P
IF n [I] = 0
COUNT1 = COUNT1 + 1
ELSEIF n [I] > 4
COUNT2 = COUNT2 + 1
ENDIF
I = I + 1
ENDDO
RETURN COUNT1, COUNT2
MAX_MEMBER (READ N[I], READ P)
COUNT3 = n [0]
DO I = 0 TO P
IF COUNT3 > n [I]
COUNT3 = COUNT3
ELSE
COUNT3 = N [I]
ENDIF
ENDDO
Error Messages
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
7
CRITICAL THINKING AND PROBLEM SOLVING FOR IT
Error messages would be encountered if the value of P entered by the user is negative.
“Please enter an appropriate value for P” would be displayed by the system.
Error messages would be encountered if the value of N entered by the user is negative.
“Please enter an appropriate value for N” would be displayed by the system.
Error messages would be encountered if the value of I is not initialized.
“Please initialize the value of I” would be displayed by the system.
Defining Diagram
INPUT PROCESSING OUTPUT
INPUT DATA
VALUE OF P
VALUE OF N
DO I = 0 TO P
IF n [I] = 0
COUNT1 = COUNT1 + 1
DO I = 0 TO P
ELSEIF n [I] > 4
COUNT2 = COUNT2 + 1
DO I = 0 TO P
IF COUNT3 > n [I]
COUNT3 = COUNT3
DO I = 0 TO P
ELSE
COUNT3 = N [I]
Hierarchy Chart
chevron_up_icon
1 out of 8
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]