Question: PART B Write the following three methods: public int GetRandomUniformint min, int max) This method returns a random number from a uniform distribution between wiw

PART B Write the following three methods: public int GetRandomUniformint min, int max) This method returns a random number from a uniform distribution between wiw and maE pablic doule GetRandomNormal double mean, double stddev) mean of meam and standard This method returns aran km number from a normal distribution w ith deviation of stadev public int GetBinIndexidouble mini, double maxi, int nunibins, double valuetobin) This method returns the Bin lndex given?input mitamum of mini, input maxinnum of Mti, numbins "umber of bins, and a value to bin of ??1aerobin PART C Include the methods created in part B to develop a Visual C NET program that will simulate the basic profit calculation, Pr nP, where a follows a uniform distribution, P, follows a nomal distribution, and the user can input the number of bins and number of iterations. The user must also input the min and mux for 't and the meam and standard deviation for P,? Finally, the user can elick a button and the results will be graphed on a bar chart using the Microsoft Chart Control and the average total profit (Pr) will be displayed in a textbox. Tum in a screen shot of the resulting chart using: l. lterations: 10000 Bies: 5 ?-min: 1 n-max: 10 P.-mesm: 6000 F-stddev: 750 2. lterations: 10000 Bins: 10 -min: 1 n-mux: IO P.-mean: 6000 P-stddev: 750 3. Iterations: 10000 Bins: 10 m-min: -x: 0 P-mea: 5000 P-Midev: 1500 That's three screen shots. PART D Extend the Visual C# ,NET program developed in part C to simulate the basic profit calculation. Pr nP, where the user can select either a uniform or normal distribution for using radio buttons and then must input the appropriate parameters (min and max if they select uniform. mean and standard deviation if they select normal) and they can similarly select either a uniform or normal distribution for P, with appropriate parameters depending on the selection. Of course the user will inpat the namber of bins and number of iterations. Finally, the user can click a button and the results will be graphed on a bar chart using the Microsoft Chart Control and the average total profit (P will be displayed in a textbox Also include in the program any necessary input validation forll input values. Turn in a listing of the code and a screen shot of the resulting chart using: n-max: 10 n-steidev: 2 n-staller: 3 Pr-mean: P.-min: P.-min: 8000 1000 1500 PrSrddev: P"max: Pv-mux: 2000 9000 l0000 I. ?-min: 1 2. 3. lterations. I0000 Bins: 5 lierations. I0000 Bins: 10 lterations: 10000 Bins: 10 -mean: 8 n-mem: 14 That's three screen shots and a listing of the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
