Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a GUI like the one shown below with the functionality described below. Pa

ID: 3829726 • Letter: C

Question

Create a GUI like the one shown below with the functionality described below.

Panel – Circle Data title

Labels – radius, area, circumference

Text Fields:

Radius – user enters the radius value here

Area – when the calculate button is clicked, the area (based on the radius entered) displays here; formatted with two decimal places

Circumference – when the calculate button is clicked, the circumference (based on the radius entered) displays here; formatted with two decimal places

Buttons:

Calculate – reads the value of the radius from the text field, calculates the area and circumference; displays the area and circumference

Clear – empties the radius, area, and circumference text fields o Exit – closes the application

Circle Data Radius Area: Circumference. 78.54 31.42 Calculate Clear

Explanation / Answer

Public Class circle data

Inherits System.Windows.Forms.Form

Private Sub BtnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles BtnCalculate.Click

Dim Radius, Area, Circumference As Double

Const PI = 3.14159

Radius = CDbl(TxtRadius.Text)

Area = PI * Radius * Radius

Circumference = 2 * PI * Radius

TxtArea.Text = CStr(Area)

TxtCircumference.Text = CStr(Circumference)

End Sub

Private Sub

BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click

Me.Close()

End Sub

private sub

BtnClear_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnclear.Click

me.click()

txtradius = " "

txtarea =" "

txtcircumference = " "

End sub

End Class