Paper Instructions

Programming Assignment 8 File Plot Assigned: April 4, 2016 Due: April 13, 2016 Write a C# program to read in a data file which contains a sequence of data points and plot the data points as a continuous graph in the Cartesian plane. Your program should the chart tool in the C# forms toolbox. Your user GUI should look something like that below. The File menu should have at least two items: Open and Exit. The Open option will allows the user to open a dialog box and select a file to graph. The Exit option will exit the program. The About menu will give a new form that will give the name of the program, the author’s name, the date, and the line “Engr 123 Assignment 8”. The About box will have one button which will allow the user to close the box. You should use a text box or a label to print the plot status. The status should indicate the minimum and maximum values in the x and y directions. Test data for this assignment is on the web site as Asn08Test.zip Figure 1 Typical user interface with a panel and a menu Figure 2 Typical About box After you get your program running correctly, place a copy of the design into the project folder as a doc or docx file. Right click on the project folder and choose Send To → Compressed zip file. Rename the compressed zip file as Asn08XXX.zip where XXX are you three initials. Upload the renamed file to \\cecsfp01\users\everyone\engr123. -6.28319, 1 -6.15752, 0.992115 -6.03186, 0.968583 -5.90619, 0.929776 -5.78053, 0.876307 -5.65487, 0.809017 -5.5292, 0.728969 -5.40354, 0.637424 -5.27788, 0.535827 -5.15221, 0.425779 -5.02655, 0.309017 -4.90088, 0.187381 -4.77522, 0.062791 -4.64956, -0.06279 -4.52389, -0.18738 -4.39823, -0.30902 -4.27257, -0.42578 -4.1469, -0.53583 -4.02124, -0.63742 -3.89557, -0.72897 -3.76991, -0.80902 -3.64425, -0.87631 -3.51858, -0.92978 -3.39292, -0.96858 -3.26726, -0.99211 -3.14159, -1 -3.01593, -0.99211 -2.89027, -0.96858 -2.7646, -0.92978 -2.63894, -0.87631 -2.51327, -0.80902 -2.38761, -0.72897 -2.26195, -0.63742 -2.13628, -0.53583 -2.01062, -0.42578 -1.88496, -0.30902 -1.75929, -0.18738 -1.63363, -0.06279 -1.50796, 0.062791 -1.3823, 0.187381 -1.25664, 0.309017 -1.13097, 0.425779 -1.00531, 0.535827 -0.87965, 0.637424 -0.75398, 0.728969 -0.62832, 0.809017 -0.50265, 0.876307 -0.37699, 0.929776 -0.25133, 0.968583 -0.12566, 0.992115 1.42E-14, 1 0.125664, 0.992115 0.251327, 0.968583 0.376991, 0.929776 0.502655, 0.876307 0.628319, 0.809017 0.753982, 0.728969 0.879646, 0.637424 1.00531, 0.535827 1.130973, 0.425779 1.256637, 0.309017 1.382301, 0.187381 1.507964, 0.062791 1.633628, -0.06279 1.759292, -0.18738 1.884956, -0.30902 2.010619, -0.42578 2.136283, -0.53583 2.261947, -0.63742 2.38761, -0.72897 2.513274, -0.80902 2.638938, -0.87631 2.764602, -0.92978 2.890265, -0.96858 3.015929, -0.99211 3.141593, -1 3.267256, -0.99211 3.39292, -0.96858 3.518584, -0.92978 3.644247, -0.87631 3.769911, -0.80902 3.895575, -0.72897 4.021239, -0.63742 4.146902, -0.53583 4.272566, -0.42578 4.39823, -0.30902 4.523893, -0.18738 4.649557, -0.06279 4.775221, 0.062791 4.900885, 0.187381 5.026548, 0.309017 5.152212, 0.425779 5.277876, 0.535827 5.403539, 0.637424 5.529203, 0.728969 5.654867, 0.809017 5.78053, 0.876307 5.906194, 0.929776 6.031858, 0.968583 6.157522, 0.992115 6.283185, 1 Engr 123 Notes on using the Chart tool The chart tool in the forms toolbox allows you to plot a variety of charts and set up colors, titles, legends, etc. To use the chart tool create a forms project in C#. You will find the chart tool in the toolbox under the Data heading. Drag the chart tool to your form and size it to the proper size for your plot. Once the chart tool is in place go the Properties menu and look for Titles. To the right of the Titles item you will see a box labeled Collection … Click on the box with the three dots and remove any existing titles from the collection. Do the same for Series, Legends, and Chart areas. Give your chart a name. In the following example the chart is named chtSin. You will need to add the following using statement to your code at the top: using System.Windows.Forms.DataVisualization.Charting; The example code on the following page shows how to use the chart tool to do a line plot of a sine and cosine on the same graph in two different colors. Once you have created a line chart type you need only add the x and y value in pairs to the series using the Points.AddXY() function like this: sinSeries.Points.AddXY(t, y); This particular example plots a sine and cosine wave from 0 to 4π. private void btnPlot_Click(object sender, EventArgs e) {double t, y, tIncr; chtSin.ChartAreas.Add(“Default”); // Add a series with some data points. Series sinSeries = new Series(); sinSeries.ChartType = SeriesChartType.Line; tIncr = 4*Math.PI/500; for (t=0;t<4*Math.PI;t+=tIncr) {y = Math.Sin(2*Math.PI*t); sinSeries.Points.AddXY(t, y); } Series cosSeries = new Series(); cosSeries.ChartType = SeriesChartType.Line; tIncr = 4*Math.PI/500; for (t=0;t<4*Math.PI;t+=tIncr) {y = Math.Cos(2*Math.PI*t); cosSeries.Points.AddXY(t, y); } chtSin.Series.Add(sinSeries); chtSin.Series[0].Color = Color.Black; chtSin.Series.Add(cosSeries); chtSin.Series[1].Color = Color.Red; chtSin.ChartAreas[0].AxisX.Title = “Time”; chtSin.ChartAreas[0].AxisX.LabelStyle.Format = “{0.00}”; chtSin.ChartAreas[0].AxisY.Title = “Volts”; chtSin.ChartAreas[0].AxisY.LabelStyle.Format = “{0.00}”; } …
Purchase answer to see full attachment

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com. We assure you of a well written and plagiarism free papers delivered within your specified deadline.