Question: Final Program: Unit Converter User Interface This part of the project is the last for the unit conversion program and will combine everything from the

Final Program: Unit Converter User Interface
This part of the project is the last for the unit conversion program and will combine
everything from the modules to create a program that can convert units of measurement
to/from imperial and metric. For this task youll be required to create a text-based user
interface that calls the user-defined function you created in module 2 to perform the
required unit conversions.
User Interfaces are important in computer programs; they consist of menus and prompts
that can be interacted with by a user to input information into the program.
User-defined functions allow for effective code reuse and is good programming practice
when creating programs that require the same or similar code to be executed many times.
function out = MyFunction(in1, in2)% Rename function and
input/output variables to appropriate name (not MyFunction)
% Insert code here to perform appropriate unit conversions.
out =% Set output variable to the converted value
General Taks Requirements
For this part of the project you are to write a text-based user interface for your unit
conversion program that will:
- Prompt the user to enter a number to be converted.
- Prompt the user to select a conversion-type from a menu.
- Call the myunitconv() function you wrote for module 2 to perform the
appropriate unit conversion.
- Output the converted number along with its unit in a neat and coherent way on the
Command Window.
User-interface Requirements
Your program must be able to obtain user input including:
- The number the user wants to convert. This can be a whole or decimal number.
- The type of conversion the user wants to perform. This will be selected from a
menu. The options in the menu can either be selected using a numerical entry (e.g.
1,2,3,4, etc), or a single character entry (e.g. a, b, c, d, e, etc).
- There must be some error handling present to ensure the user is re-prompted for
input if they make a mistake. A mistake could include a menu item being selected
that doesnt exist, or an input being left blank.
Youll need to think not only about the way your program calculates the output required to
solve the problem (its functionality) but also how simple it is for a user to input and receive
output from your program (its usability).
Your user interface must be text-based only. It must not be in the form of a GUI (i.e. it must
not be created using App Designer, GUIDE, or using the dialog() or menu() functions).
You must submit two .m files containing both your user-interface script and your userdefined function for assessment to Canvas.
Due date and further details on this task:
The final submission for this project is due at the end of week 9(Friday, before 11:59pm).
Youre required to submit your work to Canvas (under Assignments -> Final Individual
Project (Individual Task). Your submission will include the following:
- A report documenting your problem statement, algorithm design (in the form of
flow-charts), evidence of testing, and an evaluation on how well your program fulfils
the requirements. This will be in either Word (.docx) or pdf format.
- Your MATLAB files (including the user interface file and your user-defined function
file (.m files)).
More details, including the marking guide, can be found on Canvas under Modules -> Wee

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!