1. Define an interface
Define an interface called Measuring Device. Add it to your project in its own Measuring Device.cs source file (Project > Add New Item > Interface). Add the following public method declarations to your new interface:
Comment your new method declarations so developers using your interface know what they are meant to do.
2. Define an enumeration
Define an enumeration called Units. Add it to your project in its own UnitsEnumeration.cs source file. You may do so by adding a new class (Project > Add New Item > Class) called Units Enumeration and changing the empty class declaration generated into an enum declaration ("class Units Enumeration" -> "enum Units"). Make your enumeration publicly accessible, and add values Metric and Imperial to it. Comment your enumeration so its purpose is clear.
3. Define a Device class
Define a class called Device. Add it to your project in its own Device.cs source file. Make it publicly accessible and give it one method:
Comment your class so developers using it know what it does and how to use it.
4. Create the MeasureLengthDevice class
Define a class called MeasureLength Device. Add it to your project in its own MeasureLength Device.cs source file. This class will implement the Measuring Device interface. You may generate stubs for your implementation methods using the Implement Interface Wizard.
Add the following private fields to your class (as well as any others you deem necessary):
Add a constructor for your class which initializes your fields.
Add a means for units ToUse to be set according to user input.
Give your class access to the Device. GetMeasurement() method you created. Should the relationship between MeasureLength Device and Device be is-a or has-a?
Write function bodies for your interface methods:
5. Build the user interface
In MainWindow.xaml.cs, create an instance of your MeasureLengthDevice class. This object will be accessed and manipulated by the controls on your form. Where/when should this object be created?
Add controls to your MainWindow form:
Give the user a way to set the units of measurement (units ToUse).
Provide a mechanism to start and stop the measurement cycle (StartCollecting / Stop Collecting). Should your interface change when these controls are clicked? Are all of the control options valid in both states (collecting / not collecting)? What happens when the user tries to use the interface in ways you may not have expected?
Create places (labels) to display the current measurement (mostRecentMeasure) and the timestamp when it was taken.
Create a way to display the most recent measurement in the alternate to the selected measurement units (MetricValue / ImperialValue). That is, if the selected units are metric, show the measurement in imperial, and vice-versa. Which units are being collected? Where/how will you display the converted value
Add a button to display the measurement history (GetRawData). Where/how will you display this list? What did you make GetRawData() return? Does the list start with the oldest value collected? What happens when your history array fills up and older values are overwritten? What happens when your history has not been filled up yet? Does "0" count as an actual history entry? Does your history display the units in which the data was collected?
6. Capture screenshots
Capture an image of your application collecting data and displaying the current measurement in the selected units and the timestamp.
Capture an image of your application displaying the current measurement converted to the alternate units.
Please provide a document with all your code from all your files in the project with proper titles. In addition create a screen capture of your application in the following states:
1) Capturing Data showing the active 'Get Data and the most recent collection in a label on the form with a timestamp.
2) Displaying raw data in the array with a click event from a button on the main form.
3) Displaying data converted to the proper measurement as selected by the user. This should be the show the opposite of the current measurement. For our example, always assume the data coming from the device is in inches and we want to convert to centimeters