Report
Report
Student ID S3915144
Page numbers 8
"I declare that in submitting all work for this assessment I have read, understood and agreed to the
content and expectations of the Assessment declaration."
Semester 2 – 2022
1
Table of Contents
Background and Design 3
Describe requirements of the program and its purpose 3
Describe, show and explain your users Defined Functions with
annotations 3
The Structure of the program (flow-charts, block diagrams, etc.) 5
Solution and Testing 6
Include a table that show the behaviour of the program 6
Include a screenshot of your program 7
Conclusion and Future Work 7
Describe how well your program has fulfilled the requirements of
the task 7
List any weakness with the way the program works and what could
be done in the future to make the program better 7
References 8
2
Background and Design
b. Describe, show and explain your users Defined Functions with annotations.
3
P-2 & P-3: Switch Function
The program is started by giving the Command Window for the users to understand that
there are a total of 14 transformations in the program. I have created a menu panel that
allows the users to easily select the type of conversion to use, so I use the 'disp' command
to bring up the appropriate menu panel window in order of temperature conversion,
distance -length, and mass.
4
P-4: Menu displays on command windows
Nextly, I use the 'input' command to ask the users to select a conversion item, and the 'while
loop' command to check if the number of users is within the menu range, otherwise the
program throws an 'Error' ! Re-Enter another input' . Command line ‘sol =
matrixdi(t,s);’ directs the program to the switch program also known as the
calculation program named 'matrixdi.m' (P-2 & P-3). In situations one and two, I allow the
users to enter the data they wish to convert, and I do the conversion using a standard
temperature calculation. To determine whether the users submitted the proper positive
amount, I used a "if-else" loop in the remaining situations. because a mass or length
computation cannot provide a negative result. Also in lines 32-35 of P-1, I have reused the
'while-loop' function for users who want to stop conversion computations. And if you
continue, the users will be able to calculate and produce the desired results with 3-digit
decimal numbers.
P-5: Algorithm
5
In the command line get the variable 't' from the users, for cases 1 and 2 the program will not check,
but will check the remaining cases the program will always check the variable 't' entered by the
users. must be greater than or equal to 0.
Temperature
Mass
6
P-5: Testing number 0, on-demand data, and error figures
7
References