代写 Scheme html Java javaFx math scala graph statistic software Scalable Cross-Platform Software Design:

Scalable Cross-Platform Software Design:
Graphical User Interface Design and Implementation Coursework#3
25% of the module mark: Marking scheme on Moodle
General disclaimer:
1. Software should be developed using NetBeans
2. Graphical User Interface (GUI) will based on JavaFX platform
Required results: Please submit as a single zip file which contains the whole NetBeans project folder and a brief section in the report to convince the client that it works correctly (evidence please).
Statistic calculator
A well-known Aerospace company AirCoach requests you to design and implement software with a user-friendly user interface to be integrated with their optical roughness metrology device. Their plan is to use the optical roughness device to measure “how smooth” the inner-lining of the inner engine cylinder of their new flagship plane Nimbus 2020. As they found from simulation that roughness of the engine cylinder degrades the engine’s efficiency, lifetime, and increases carbon and noise emission.
Figure 1 Illustration of the cylinder and the roughness on the surface of an engine cylinder.
1

You have been supplied with the manual of the optical roughness metrology device which describes with the working principle of the device. You note that the most important aspect which related to your task, to develop the accompanying software, is that the device will output a text file which lists the roughness as the deviation 𝛿 in the unit of meter from an ideal circle (see Fig. 1).
For illustration purposes, the first few lines of such text file are given in Fig. 2,
Figure 2 Few lines of the content of the measurement device in the unit of meter.
Specifically, the engine designers need the following information from the measurements and wish that your software can provide it,
1. Has a user-friendly user interface
2. Streaming from the text file, to have the text file as an input
3. Calculatethemean,variance,medianandstandarddeviationof𝛿
4. Plot the normalised histogram of the deviation 𝛿, with an option to choose
different bin method (See Advice 1).
5. Fit and plot the histogram with a Probability Density Function model (PDF) (Advice
3).
6. Save the histogram and the fitted PDF as a Bitmap png file.
7. The software should also display the fitting parameters. For example: 𝛼. 𝜇 and 𝜎
for Normal Probability Density Function (Advice 3).
Having only fundamental statistical background, you consult with statisticians on how to do point 4 to 5 and they give you the following advice.
Advice 1:
In statistics, there are several ways to define the “number of bin” and there is no best way to define bin as different bin can reveal different features of data. In general, a good bin should
 Bins should be all the same size. See below how to calculate the bin size.
 Bins should include all of the data.
6.000199e-05 -4.671694e-05 -1.083731e-04 -1.894823e-04 1.119588e-04 …
2

It is common to display histogram using different bin number which can be calculated using
 Square root choice
 Sturge’s formula
 Rice rule
𝑘 = √𝑛
𝑘 = 3.3 log 𝑛 + 1
3
𝑘 = 2√𝑛
where 𝑘 is the number of bins, 𝑛 is the number of observation data and log() is natural logarithm.
Advice 2:
A histogram depicts “how many times” a certain value is observed during measurement, thus it magnitude changes depending on the total number of measurement. This type-of histogram is called un-normalised histogram.
A normalised histogram, on the other hand, shows what is the probability of a certain value will be observed if there is an infinite number of measurement.
In most cases, a normalised histogram is more useful than the un-normalised histogram in representing a large measurement data as is our task.
Normalising a histogram can be obtained by dividing the number of observation in each bin by the unnormalized_data_count*bin_size, where the bin_size = (max(measurement data) – min(measurement data))/k.
IF DON’T UNDERSTAND, ASK YOUR CLIENT!
Advice 3:
You need a normalised histogram to fit with a Probability Density Function (PDF). In our case, Normal PDF is appropriate and is given by
−1(𝑥−𝜇)2 𝑓(𝑥)=𝛼e2 𝜎 ,
where the PDF parameters are, 𝛼 is the normalisation coefficient 𝜇 is the centre of the PDF
𝜎 is the width of the PDF.
3

There are a number of ways to fit the histogram to a PDF, the most well-known method is called Levenberg-Marquardt method.
WE ARE NOT GOING INTO THE DETAIL OF MARQUARDT METHOD. IT IS QUITE MATHEMATICAL AND OUT OF THE SCOPE OF THE MODULE.
I HAVE PROVIDED A NETBEANS PROJECT IN MOODLE IN WHICH I DEMONSTRATE THE USE OF WELL- DEVELOPED OPEN-SOURCED LIBRARY FROM APACHE WHICH IMPLEMENT THE MARQUARDT METHOD. DOCUMENTATION OF THE LIBRARY CAN BE SEEN IN http://commons.apache.org/proper/commons-math/apidocs/overview-summary.html
Appendix
For references, based on the provided data file, it is the expected un-normalised, normalised histogram and its Normal PDF fitting are shown in Fig. 3.
Figure 3 The un-normalised and normalised histogram; number of bin is calculated using Sturge’s formula.
End of document.
4