Public Class Circle Private Rad As Double Cosnt PI As Double = 3.14159 Property Radius() As Double Get Return Rad End Get Set(ByVal Value As Double) Rad = Value End Set End Property ReadOnly Property Circumference() As Double Get Return 2 * PI * Rad End Get End Property ReadOnly Property Area() As Double Get Return PI * Rad * Rad End Get End Property End Module In this exercise, assume that a circle object name one Circle has been created in a program that uses the circle class and that the radius of a Circle is 4.5 What is the value stored in the text box named txtCircumference when the following line of Visual Basic code executes? txtCircumference.Text = oneCircle.Circumference Assuming theris a text box named txtArea, is the following a legeal Visual Basic statement? Why or why not? txtArea.Tet = Area() Consider the following Visual Basic code. What is the value stored in the oneCircle object’s property named Radius? txtRadius.Text = 6.0 oneCircle.Radius = txtRaduis.Text
Public Class Circle
Private Rad As Double
Cosnt PI As Double = 3.14159
Property Radius() As Double
Get
Return Rad
End Get
Set(ByVal Value As Double)
Rad = Value
End Set
End Property
ReadOnly Property Circumference() As Double
Get
Return 2 * PI * Rad
End Get
End Property
ReadOnly Property Area() As Double
Get
Return PI * Rad * Rad
End Get
End Property
End Module
In this exercise, assume that a circle object name one Circle has been created in a program that uses the circle class and that the radius of a Circle is 4.5
- What is the value stored in the text box named txtCircumference when the following line of Visual Basic code executes?
txtCircumference.Text = oneCircle.Circumference
- Assuming theris a text box named txtArea, is the following a legeal Visual Basic statement? Why or why not?
txtArea.Tet = Area()
- Consider the following Visual Basic code. What is the value stored in the oneCircle object’s property named Radius?
txtRadius.Text = 6.0
oneCircle.Radius = txtRaduis.Text
- Write the Visual Basic code that will assign the circumference of oneCircle to a Double variable named circumference1.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps