Highlights
Conditional Statements and Error Checks
In this milestone we’ll be adding some extra functionality to the unit conversion program.
For this part of the project remove the sections (%%) from your previous script and create a more complex text-based user-interface that allows the user to input on the Command Window the number they want converted as well as which unit they want to convert and in which direction they want to convert (imperial to metric or vice-versa). Use conditional statements (switch/case and/or if-statements) to only perform the required conversion.
Once you have this working include some simple error handling to your program to perform the following:
- Your program should now continue to ask for user input if a user has entered an invalid input. The program should only continue once a valid input is entered and accepted.
- Your program should output meaningful messages to the user to inform them of what they entered incorrectly and how to fix their error. Possible invalid inputs you should consider are:
- Negative numbers being input for units that can only be positive (energy, volume and pressure).
- Incorrect strings being entered (spelling mistakes).
- Menu items being entered that are not options.
- Inputs being left blank
This Engineering Assignment has been solved by our Engineering experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.