Visual C# - This must be a Universal Windows Application form Starting out a project program called Data Collector Please Define an interface Define an interface called IMeasuringDevice . Add it to...


Visual C# -
This must be a Universal Windows Application form



Starting out a project program called Data Collector




Please Define an interface


Define an interface calledIMeasuringDevice. Add it to your project in its own IMeasuringDevice.cs source file  Add the following public method declarations to your new interface:




  • MetricValue. This method will return a decimal that represents the metric value of the most recent measurement that was captured.


  • ImperialValue. This method will return a decimal that represents the imperial value of the most recent measurement that was captured.


  • StartCollecting. This method will start the device running. It will begin collecting measurements and record them.


  • StopCollecting. This method will stop the device. It will cease collecting measurements.


  • GetRawData. This method will retrieve a copy of all of the recent data that the measuring device has captured. The data will be returned as an array of integer values.


Comment your new method declarations to know what they are meant to do.




Please Define an enumeration


Define an enumeration calledUnits. Add it to your project in its own UnitsEnumeration.cs source file. You may do so by adding a new class  called UnitsEnumeration and changing the empty class declaration generated into an enum declaration ("class UnitsEnumeration" -> "enum Units"). Make your enumeration publicly accessible, and add values
Metric andImperial to it. Comment your enumeration so its purpose is clear.




Define a Device class


Define a class calledDevice. Add it to your project in its own Device.cs source file. Make it publicly accessible and give it one method:




  • GetMeasurement. This method will return a random integer between 1 and 10 as a measurement of some imaginary object.


Comment your class



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here