Deakin College SIT105 Thinking Tech & Design Major Assignment

Verified

Added on  2023/04/23

|5
|626
|376
Homework Assignment
AI Summary
This assignment solution for Deakin College's SIT105 Thinking Technology and Design course includes detailed answers to four questions. The solutions utilize IPO charts and pseudo code to address problems related to mobile usage, zoo ticket price calculation, and rain forecasting. The document provides algorithms for each scenario, demonstrating the use of sequence, selection, and iterative constructs. The solution is designed to help students understand the concepts behind programming and problem-solving. Desklib offers a wealth of similar resources, including past papers and solved assignments, to support students in their academic endeavors.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Q no 1 Answer:
IPO Chart:
Input Process Output
Phone number Get phone number from user Country name
Extract the country code from
the phone number
Identify the country using the
country code
Display the country name
Q no 2 Answer:
Pseudo code:
Mobile_Usage //Main algorithm for determining the mobile use and display warning message
Get mobile_usage_in_min
//Checking if mobile_usage_in_min is less than 1 hour (Since 1 hour is equal to 60 minutes)
IF mobile_usage_in_min < 60 THEN
DISPLAY "Usage is acceptable"
//Checking if mobile_usage_in_min is greater than or equal to 1 hour and less than 2 hours
ELSE IF 60 <= mobile_usage_in_min && mobile_usage_in_min < 120
DISPLAY "Mediocre Usage"
//Checking if mobile_usage_in_min greater than 2 hours or not
ELSE IF 120 < mobile_usage_in_min
DISPLAY "Warning, using your phone more than 2 hours per day can affect your health"
ENDIF
END
Q no 3 Answer:
Pseudo code:
//Main Algorithm to read data from a file, Calculate ticket price and write to another file
Calculate Zoo_Ticket_Price
Initialise
Write_Headings
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
REPEAT
Read_Input
Calculate_Price
Write_to_File
UNTIL EOF
Finalisation
END
//Initialising the variables and opening the files
Initialise
OPEN Family_Info.xlsx
OPEN Ticket_Prtice.xlsx
family_name = ""
number_of_adults = 0
number_of_teenagers = 0
number_of_children = 0
number_of_infants = 0
total_ticket_price = 0
adults_ticket_price = 37
teenagers_ticket_price = 25
children_ticket_price = 18
END
//Writing headings in Ticket_Prtice.xlsx file
Write_Headings
WRITE "Family Name, Total Ticket Price” TO Ticket_Prtice.xlsx
END
//Reading inputs from Family_Info.xlsx file
Read_Input
READ family_name, number_of_adults, number_of_teenagers, number_of_children,
number_of_infants FROM Family_Info.xlsx
END
Document Page
//Calculating the total Ticket Price for each family
Calculate_Price
total_ticket_price = (number_of_adults * adults_ticket_price) + (number_of_teenagers *
teenagers_ticket_price) + (number_of_children * children_ticket_price)
END
//Writing the results to the file Ticket_Prtice.xlsx
Write_to_File
WRITE family_name, total_ticket_price TO Ticket_Prtice.xlsx
END
//Closing the both file
Finalisation
CLOSE Family_Info.xlsx
CLOSE Ticket_Prtice.xlsx
END
Q no 4 Answer:
Pseudo code:
//Main Algorithm to forecast the rain
Rain_Forecast
Initialise_Variables
Get_Valid_Temperature
Get_Valid_Humidity
Display_Message
END
//Initialising the Variables
Initialise_Variables
temperature = 0
humidity = 0
END
//Will take input from the user for Temperature and validate it
Document Page
Get_Valid_Temperature
REPEAT
DISPLAY "Please enter the temperature"
GET temperature
IF ! (-20 < temperature && temperature < 55)
DISPLAY "Invalid input. Temperature should be between -20 and 55."
ENDIF
UNTIL -20 < temperature && temperature < 55
END
//Will take input from the user for Humidity and validate it
Get_Valid_Humidity
REPEAT
DISPLAY "Please enter the humidity"
GET humidity
IF !(0 < humidity && humidity <= 100)
DISPLAY "Invalid input. Humidity should be a positive integer equal or less than 100."
ENDIF
UNTIL 0 < humidity && humidity <= 100
END
//Displaying the Rain Chances
Display_Message
IF temperature < 0 && humidity < 20
DISPLAY "Chance of Rain is 0%";
ELSEIF (0 < temperature && temperature < 15) && (20 < humidity && humidity < 40)
DISPLAY "Chance of Rain is 20%";
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
ELSEIF (15 < temperature && temperature < 30) && (40 < humidity && humidity < 60)
DISPLAY "Chance of Rain is 50%";
ELSEIF (30 < temperature) && (60 < humidity && humidity < 80)
DISPLAY "Chance of Rain is 75%";
ELSEIF (30 < temperature) && (80 < humidity)
DISPLAY "Chance of Rain is 90%";
ENDIF
END
Hierarchy chart:
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

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

Available 24*7 on WhatsApp / Email

[object Object]