Deakin College SIT105 Thinking Technology & Design Major Assignment

Verified

Added on  2023/04/23

|6
|694
|181
Homework Assignment
AI Summary
This document presents solutions to a Thinking Technology and Design assignment, focusing on algorithm development and program design. The assignment includes creating an IPO chart for a program that identifies a country name from a phone number, writing pseudocode for a mobile usage tracking program, developing an algorithm for a ticket price calculator, and designing an algorithm with a hierarchy chart for weather prediction based on temperature and humidity. The solutions demonstrate the application of sequence, selection, and iterative constructs, as well as modularization techniques. Desklib offers a wide range of study resources, including past papers and solved assignments, to support students in their academic endeavors.
Document Page
Running head: THINKING TECHNOLOGY AND DESIGN
THINKING TECHNOLOGY AND DESIGN
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
1THINKING TECHNOLOGY AND DESIGN
1. The program is upon receiving a phone number with the country code the program
displays the country name. The IPO chart or the defining diagram of the program is
shown below.
Input Processing Output
Phone number with
country code
Processing items:
Input Phone number, phone
number and country code
directory file.
Algorithm:
1. Enter the phone
number.
2. Extract the country
code (first three
characters) from the
number.
3. Find the extracted
code in the
directory file and
country name
corresponding to it.
4. Display the country
name.
Country name of the
phone number
2. The pseudocode of the program is the following.
Document Page
2THINKING TECHNOLOGY AND DESIGN
Pseudocode:
Function Mobile_Usage_Display // name of the program
// reading usages from mobile application in minutes
Read Mob_app_file
For day_start to day_end
Usage = (usage_end_time_in_min – usage_start_time_in_min)
end
Total_usage = sum Usage // summing the usages in minuites
// displaying messages according to usage and minutes are converted to hours dividing
by 60.
If Total_usage/60 < 1
Printf ‘Usage is acceptable’
Elseif Total_usage/60 >= 1 && Total_usage/60 =< 2
Printf ‘Mediocre Usage’
Else
Printf ‘Warning, using your phone more than 2 hours
per day can affect your health’
end
end
3. The algorithm of the program is as following.
Algorithm:
function ticket_price_calculator // initialize the program with function name
Read Family_Info.xlsx // reading the Family_Info.xlsx file
Get Variable_Names // extracting the variable names from file
// calculating the prices for different age groups for all the families
Document Page
3THINKING TECHNOLOGY AND DESIGN
For i=1 to row_length_Family_Info
Adult_ticket_price = Number_of_Adults*37
Teenagers_ticket_price = Number_of_Teenagers*25
Children_ticket_price = Number_of_Children*18
Infant_ticket_price = Number_of_Infants*0
end
Total_Ticket_Price = Adult_ticket_price + Teenagers_ticket_price +
Children_ticket_price + Infant_ticket_price // calculating total ticket price
filename = 'Ticket_Prtice.xlsx' // giving the filename for writing
// Family_Name and Total_Ticket_Price are saved with headers.
header = {'Family Name','Total Ticket Price'; Family_Name;Total_Ticket_Price}
sheet = 1 // sheet number for excel file
xlrange = ‘A1’ // starting range of writing in excel file
xlswrite(filename,header,sheet,xlRange) // writing Family_Name and
Total_Ticket_Price in the Ticket_Prtice.xlsx file.
end
4. The algorithm of the program is shown along with the hierarchy chart.
Hierarchy chart:
Read input
temperature and
humidity percentage
Display error
message if both
inputs not in range
Display rain
chance 0% on
condition
Display rain
chance 90% on
condition
Display rain
chance 50% on
condition
Display rain
chance 20% on
condition
Display rain
chance 50% on
condition
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
4THINKING TECHNOLOGY AND DESIGN
Algorithm:
Function weather_prediction(temp,percent_humid) // initializing the function which
takes temperature and humidity percentage as input in degree Celsius and percentage
respectively.
// display error message
If temp>55 && temp< -20 || percent_humid < 0 && percent_humid > 100
Printf ‘Error: temperature or humidity are not within ranges’
// display of the rain percentage according to the table
Elseif temp<0 && percent_humid < 20
Printf ‘Chance of rain is %d percent’,0
Elseif 0=< temp < 15 && 20 =< percent_humid < 40
Printf ‘Chance of rain is %d percent’,20
Elseif 15=< temp =< 30 && 40 =< percent_humid < 60
Printf ‘Chance of rain is %d percent’,50
Elseif temp > 30 && 60=< percent_humid =< 80
Printf ‘Chance of rain is %d percent’,75
Else temp > 30 && percent_humid > 80
Printf ‘Chance of rain is %d percent’,90
Document Page
5THINKING TECHNOLOGY AND DESIGN
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]