Intro to Programming Lab 5 Temperature Conversion (Form)
For this lab you will have to create the user interface for a C# Windows Form project that will accept either a Celsius or a Fahrenheit and convert that temperature to the other scale. If a Celsius temperature is entered it will be converted to Fahrenheit and vice versa.
The user should be allowed to enter a temperature in a text box, select one of two temperature scales to convert the value to and click on a button to cause the conversion and results to be displayed on the form. Temperature conversions will only be completed on valid numeric temperatures otherwise an error message should be displayed to the user on an attempt to convert.
Additionally, the user should have an option for clicking a button to clear the form of an entry and results or error messaging, and ultimately setting the form to its default state for an entry.
The user should also have the capability to click a button that would close the form and end the program.
– Use the resources provided to plan and build the user interface for this lab as follows. Pay particular attention to all the required naming conventions as outlined in the program Style Guide.
– Include one text box with an associated label for entry of value to convert.
– Include two radio buttons for selection of temperature scale to convert to, “Celsius” or “Fahrenheit”. When the program starts, or after a Clear operation the default selection should be Celsius.
– Include a label to display the results of the conversion, or an error message on a blank or invalid entry, this label should not have any other message visible when the program starts.
– Include three buttons; one to initiate the conversion of the entered value to the selected temperature scale; one to clear the text box and the results label as well as set the scale back to the default (Celsius) and set the focus in the entry text box; and a third button to exit the program.
– When the form first launches and the program begins it should appear in the center of the user’s screen.
– Do not include a control box, min or max buttons on your form.
– Ensure your design has a tidy, professional appearance following common Windows standards, is keyboard friendly and includes tool tips.
– NOTE: You will not be writing any code for this lab, simply planning and designing the form for this application. The code will be completed as part of a future lab.
As usual, to be eligible for full marks on this lab, your application must conform to the requirements as outlined above and the course Style Guide, in this case making sure to include:
– Standard course naming rules and conventions.
– Appropriate and complete program documentation, in this case a complete program comment block with full description of the form and its purpose as a key component.
– Your focus for this lab should be the effective planning and design of a user interface that is intuitive and uncomplicated by extras unnecessary controls.