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

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question

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

  1. What is the value stored in the text box named txtCircumference when the following line of Visual Basic code executes?

txtCircumference.Text = oneCircle.Circumference

 

  1. Assuming theris a text box named txtArea, is the following a legeal Visual Basic statement? Why or why not?

txtArea.Tet = Area()

 

  1. 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

 

  1. Write the Visual Basic code that will assign the circumference of oneCircle to a Double variable named circumference1.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT