Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would I code this in c# Problem: In this lab you will create a graphing program that will allow a user to graph a
How would I code this in c#
Problem:
In this lab you will create a graphing program that will allow a user to graph a parabola by entering the
appropriate function parameters and graph the function. We will use the Microsoft Chart control for the
graph. The user can also set the x and yaxis bounds and the number of points used to graph the
function.
PART A
First, create the interface in Visual C# NET. Place a TabControl on your form that has three tabs One
tab should be used for selecting the graph type and providing the parameters of the equation. A second
tab is used for selecting the x and yaxis bounds. The final tab is used for displaying the graph. Figure
shows an example of what sample program looks like when running. Recall that a parabola is of the form
y ax bx c
Figure Sample program images
PART B:
The user is now expected to enter the parameters using the TextBoxes provided. After they enter the
parameters for the parabola, they should click the Graph tab to graph the function.
Write the code that will execute when the graph tab is selected. When a tab of a TabControl is selected,
it triggers a SelectedIndexChanged event. You must use an If or Select Case statement to determine
which index was selected and perform the appropriate task based on that information. Remember that
the SelectedIndex starts at
There are two major tasks that are performed when the graph tab is selected. First, all the labels on this
graph need to be updated. These labels are used to display the maximum and minimum axis values, the
number of data points graphed, and the equation that is being graphed the parabola with parameters
plugged in iexx In order to keep your code organized, you should write a method to
perform this task.
You should also write a method to fill the data in your graph. When this method is executed, the program
will set the axis on the Microsoft Chart Control according to what they have selected and graph the
function. To set the minimum and maximum values for the Yaxis, you can access the chart's ChartArea:
d
myChart.ChartAreasAxesMinimum ;
myChart.ChartAreasAxesMaximum ;
The Axes refers to the Yaxis, Axes would refer to the Xaxis properties.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started