Imports System.ComponentModel
Public Class ControlPanelForm
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents txtClassCode As System.Windows.Forms.TextBox
    Friend WithEvents lblCodeCaption As System.Windows.Forms.Label
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents txtFirst As System.Windows.Forms.TextBox
    Friend WithEvents cmdUpdate As System.Windows.Forms.Button
    Friend WithEvents cmdRelease As System.Windows.Forms.Button
    Friend WithEvents cmdCreate As System.Windows.Forms.Button
    Friend WithEvents dtBirth As System.Windows.Forms.DateTimePicker
    Friend WithEvents txtLast As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents txtIntro As System.Windows.Forms.TextBox
    Friend WithEvents cmdGetIntro As System.Windows.Forms.Button
    Friend WithEvents cmdClose As System.Windows.Forms.Button
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents lstParty As System.Windows.Forms.ComboBox

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.Container

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.GroupBox1 = New System.Windows.Forms.GroupBox()
        Me.lstParty = New System.Windows.Forms.ComboBox()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.cmdRelease = New System.Windows.Forms.Button()
        Me.cmdGetIntro = New System.Windows.Forms.Button()
        Me.cmdCreate = New System.Windows.Forms.Button()
        Me.txtIntro = New System.Windows.Forms.TextBox()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.cmdUpdate = New System.Windows.Forms.Button()
        Me.txtLast = New System.Windows.Forms.TextBox()
        Me.dtBirth = New System.Windows.Forms.DateTimePicker()
        Me.txtFirst = New System.Windows.Forms.TextBox()
        Me.txtClassCode = New System.Windows.Forms.TextBox()
        Me.lblCodeCaption = New System.Windows.Forms.Label()
        Me.cmdClose = New System.Windows.Forms.Button()
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'GroupBox1
        '
        Me.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left)
        Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.lstParty, Me.Label4, Me.Label3, Me.Label1, Me.cmdRelease, Me.cmdGetIntro, Me.cmdCreate, Me.txtIntro, Me.Label2, Me.cmdUpdate, Me.txtLast, Me.dtBirth, Me.txtFirst})
        Me.GroupBox1.Location = New System.Drawing.Point(8, 16)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(308, 268)
        Me.GroupBox1.TabIndex = 4
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Control Panel"
        '
        'lstParty
        '
        Me.lstParty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.lstParty.Location = New System.Drawing.Point(60, 120)
        Me.lstParty.Name = "lstParty"
        Me.lstParty.Size = New System.Drawing.Size(112, 21)
        Me.lstParty.TabIndex = 8
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(12, 124)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(36, 12)
        Me.Label4.TabIndex = 7
        Me.Label4.Text = "Party:"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(12, 92)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(36, 12)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Date:"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(12, 36)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(36, 12)
        Me.Label1.TabIndex = 4
        Me.Label1.Text = "First:"
        '
        'cmdRelease
        '
        Me.cmdRelease.Enabled = False
        Me.cmdRelease.Location = New System.Drawing.Point(200, 56)
        Me.cmdRelease.Name = "cmdRelease"
        Me.cmdRelease.Size = New System.Drawing.Size(88, 20)
        Me.cmdRelease.TabIndex = 4
        Me.cmdRelease.Text = "Release"
        '
        'cmdGetIntro
        '
        Me.cmdGetIntro.Enabled = False
        Me.cmdGetIntro.Location = New System.Drawing.Point(12, 188)
        Me.cmdGetIntro.Name = "cmdGetIntro"
        Me.cmdGetIntro.Size = New System.Drawing.Size(88, 20)
        Me.cmdGetIntro.TabIndex = 6
        Me.cmdGetIntro.Text = "Get Intro -->"
        '
        'cmdCreate
        '
        Me.cmdCreate.Location = New System.Drawing.Point(200, 32)
        Me.cmdCreate.Name = "cmdCreate"
        Me.cmdCreate.Size = New System.Drawing.Size(88, 20)
        Me.cmdCreate.TabIndex = 3
        Me.cmdCreate.Text = "Create"
        '
        'txtIntro
        '
        Me.txtIntro.Location = New System.Drawing.Point(108, 184)
        Me.txtIntro.Multiline = True
        Me.txtIntro.Name = "txtIntro"
        Me.txtIntro.Size = New System.Drawing.Size(180, 68)
        Me.txtIntro.TabIndex = 6
        Me.txtIntro.Text = ""
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(12, 64)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(36, 12)
        Me.Label2.TabIndex = 4
        Me.Label2.Text = "Last:"
        '
        'cmdUpdate
        '
        Me.cmdUpdate.Enabled = False
        Me.cmdUpdate.Location = New System.Drawing.Point(200, 88)
        Me.cmdUpdate.Name = "cmdUpdate"
        Me.cmdUpdate.Size = New System.Drawing.Size(88, 20)
        Me.cmdUpdate.TabIndex = 5
        Me.cmdUpdate.Text = "Update"
        '
        'txtLast
        '
        Me.txtLast.Location = New System.Drawing.Point(60, 60)
        Me.txtLast.Name = "txtLast"
        Me.txtLast.Size = New System.Drawing.Size(112, 21)
        Me.txtLast.TabIndex = 1
        Me.txtLast.Text = ""
        '
        'dtBirth
        '
        Me.dtBirth.Format = System.Windows.Forms.DateTimePickerFormat.Short
        Me.dtBirth.Location = New System.Drawing.Point(60, 88)
        Me.dtBirth.Name = "dtBirth"
        Me.dtBirth.Size = New System.Drawing.Size(112, 21)
        Me.dtBirth.TabIndex = 2
        '
        'txtFirst
        '
        Me.txtFirst.Location = New System.Drawing.Point(60, 32)
        Me.txtFirst.Name = "txtFirst"
        Me.txtFirst.Size = New System.Drawing.Size(112, 21)
        Me.txtFirst.TabIndex = 0
        Me.txtFirst.Text = ""
        '
        'txtClassCode
        '
        Me.txtClassCode.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right)
        Me.txtClassCode.BackColor = System.Drawing.Color.White
        Me.txtClassCode.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtClassCode.ForeColor = System.Drawing.Color.DarkGreen
        Me.txtClassCode.Location = New System.Drawing.Point(332, 32)
        Me.txtClassCode.Multiline = True
        Me.txtClassCode.Name = "txtClassCode"
        Me.txtClassCode.ReadOnly = True
        Me.txtClassCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtClassCode.Size = New System.Drawing.Size(264, 252)
        Me.txtClassCode.TabIndex = 7
        Me.txtClassCode.Text = "Public Class Politician" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "  Inherits Person" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Private _Elected As Boolean" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "  " & _
        "  Private _Party As Party" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    ' Include some sample political parties." & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    P" & _
        "ublic Enum Party" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Independent" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Communist" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        National" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    " & _
        "End Enum" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Property PoliticalParty() As Party" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Get" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        " & _
        "    Return _Party" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        End Get" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Set(ByVal Value As Party)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "         " & _
        "   _Party = Value" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        End Set" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Property" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Property IsIn" & _
        "Office() As Boolean" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Get" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "            Return _Elected" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        End Get" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & _
        "        Set(ByVal Value As Boolean)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "            _Elected = Value" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        End S" & _
        "et" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Property" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Sub New(ByVal FirstName As String, ByVal Last" & _
        "Name As String, _" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "      ByVal Age As Integer)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        MyBase.New(FirstName, La" & _
        "stName, Age)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Sub" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Sub New(ByVal FirstName As String, ByVal" & _
        " LastName As String, _" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "      ByVal BirthDate As Date)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        MyBase.New(First" & _
        "Name, LastName, BirthDate)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Sub" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Sub New(ByVal FirstName As" & _
        " String, ByVal LastName As String, _" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "      ByVal BirthDate As Date, ByVal Polit" & _
        "icalParty As Party)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        MyBase.New(FirstName, LastName, BirthDate)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "       " & _
        " _Party = PoliticalParty" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Sub" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Sub New(ByVal FirstName As S" & _
        "tring, ByVal LastName As String, _" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "      ByVal BirthDate As Date, ByVal Politic" & _
        "alParty As String)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        MyBase.New(FirstName, LastName, BirthDate)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "      " & _
        "  ' Convert string to enumerated value." & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        _Party = Party.Parse(_Party.Get" & _
        "Type, PoliticalParty)" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Sub" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    Public Overrides Function GetIntroduct" & _
        "ion() As String" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        ' Make use of the original GetIntroduction function." & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & " " & _
        "       Dim Intro As String = MyBase.GetIntroduction" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        ' Add some additi" & _
        "onal politician-specific content." & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Intro &= "". I am a politician for the" & _
        " "" & _Party.ToString & "" party.""" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "        Return Intro" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "    End Function" & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & Microsoft.VisualBasic.ChrW(13) & Microsoft.VisualBasic.ChrW(10) & "End " & _
        "Class"
        '
        'lblCodeCaption
        '
        Me.lblCodeCaption.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblCodeCaption.Location = New System.Drawing.Point(332, 12)
        Me.lblCodeCaption.Name = "lblCodeCaption"
        Me.lblCodeCaption.Size = New System.Drawing.Size(132, 20)
        Me.lblCodeCaption.TabIndex = 2
        Me.lblCodeCaption.Text = "The Politician Code:"
        '
        'cmdClose
        '
        Me.cmdClose.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
        Me.cmdClose.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.cmdClose.Location = New System.Drawing.Point(504, 300)
        Me.cmdClose.Name = "cmdClose"
        Me.cmdClose.Size = New System.Drawing.Size(92, 28)
        Me.cmdClose.TabIndex = 8
        Me.cmdClose.Text = "Close"
        '
        'ControlPanelForm
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)
        Me.CancelButton = Me.cmdClose
        Me.ClientSize = New System.Drawing.Size(604, 334)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.GroupBox1, Me.cmdClose, Me.lblCodeCaption, Me.txtClassCode})
        Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Name = "ControlPanelForm"
        Me.Text = "The Politician Object Tester"
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    ' Store current Person object in a form-level variable.
    Private CurrentPerson As Politician

    Private Sub cmdCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCreate.Click

        CurrentPerson = New Politician(txtFirst.Text, txtLast.Text, dtBirth.Value, lstParty.Text)

        RefreshPerson()
        cmdRelease.Enabled = True
        cmdGetIntro.Enabled = True
        cmdUpdate.Enabled = True
    End Sub




    Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
        Me.Close()
    End Sub

    Private Sub RefreshPerson()
        txtFirst.Text = CurrentPerson.FirstName
        txtLast.Text = CurrentPerson.LastName
        dtBirth.Value = CurrentPerson.BirthDate
    End Sub

    Private Sub cmdRelease_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRelease.Click
        CurrentPerson = Nothing
        cmdRelease.Enabled = False
        cmdGetIntro.Enabled = False
        cmdUpdate.Enabled = False
    End Sub

    Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click


        CurrentPerson.FirstName = txtFirst.Text
        CurrentPerson.LastName = txtLast.Text
        CurrentPerson.PoliticalParty = System.Enum.Parse(CurrentPerson.PoliticalParty.GetType, lstParty.SelectedItem)
        If CurrentPerson.BirthDate <> dtBirth.Value Then
            MessageBox.Show("Sorry, you cannot change the birth date after creating a Person!", _
              "Invalid Update", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End If
        RefreshPerson()
    End Sub

    Private Sub cmdGetIntro_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetIntro.Click
        txtIntro.Text = CurrentPerson.GetIntroduction()
    End Sub

    Private Sub ControlPanelForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lstParty.Items.AddRange(System.Enum.GetNames(GetType(Politician.Party)))
        lstParty.SelectedIndex = 0

    End Sub
End Class

Public Class Person

    ' Data for the Person
    Private _FirstName As String
    Private _LastName As String
    Private _BirthDate As Date

    Public Property FirstName() As String
        Get
            Return _FirstName
        End Get

        Set(ByVal Value As String)
            _FirstName = Value
        End Set
    End Property

    Public Property LastName() As String
        Get
            Return _LastName
        End Get

        Set(ByVal Value As String)
            _LastName = Value
        End Set
    End Property

    Public ReadOnly Property BirthDate() As Date
        Get
            Return _BirthDate
        End Get
    End Property

    ' Constructors.
    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
     ByVal BirthDate As Date)
        _FirstName = FirstName
        _LastName = LastName
        _BirthDate = BirthDate
    End Sub

    Public Sub New(ByVal FirstName As String, ByVal LastName As String)
        _FirstName = FirstName
        _LastName = LastName
        _BirthDate = DateTime.Now
    End Sub

    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
     ByVal Age As Integer)
        _FirstName = FirstName
        _LastName = LastName
        _BirthDate = DateTime.Now.AddYears(-Age)
    End Sub

    ' Built-in feature to get the Person object to introduce itself.
    Public Overridable Function GetIntroduction() As String
        Dim Intro As String
        Intro = "My name is " & FirstName & " " & LastName & ". "
        Intro &= "I was born on " & BirthDate.ToString
        Return Intro
    End Function

End Class


Public Class Politician
    Inherits Person

    Private _Elected As Boolean
    Private _Party As Party

    ' Include some sample political parties.
    Public Enum Party
        Independent
        Communist
        National
    End Enum

    Public Property PoliticalParty() As Party
        Get
            Return _Party
        End Get
        Set(ByVal Value As Party)
            _Party = Value
        End Set
    End Property

    Public Property IsInOffice() As Boolean
        Get
            Return _Elected
        End Get
        Set(ByVal Value As Boolean)
            _Elected = Value
        End Set
    End Property

    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
      ByVal Age As Integer)
        MyBase.New(FirstName, LastName, Age)
    End Sub

    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
      ByVal BirthDate As Date)
        MyBase.New(FirstName, LastName, BirthDate)
    End Sub

    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
      ByVal BirthDate As Date, ByVal PoliticalParty As Party)
        MyBase.New(FirstName, LastName, BirthDate)
        _Party = PoliticalParty
    End Sub

    Public Sub New(ByVal FirstName As String, ByVal LastName As String, _
      ByVal BirthDate As Date, ByVal PoliticalParty As String)
        MyBase.New(FirstName, LastName, BirthDate)

        ' Convert string to enumerated value.
        _Party = Party.Parse(_Party.GetType, PoliticalParty)
    End Sub

    Public Overrides Function GetIntroduction() As String
        ' Make use of the original GetIntroduction function.
        Dim Intro As String = MyBase.GetIntroduction

        ' Add some additional politician-specific content.
        Intro &= ". I am a politician for the " & _Party.ToString & " party."
        Return Intro
    End Function

End Class
