Public Class Impiegato private nome as String private salario as Double private matricola as String private anniDiServizio as Integer Public Sub New(n As String, s as Double, m as String, ads as Integer) nome = n salario = s matricola = m anniDiServizio = ads End Sub Public Sub incrementaSalario(double percentuale) salario *= 1 + percentuale / 100 End Sub Public Sub stampaInfo() System.Console.WriteLine (nome + " " + salario + " " + matricola) End Sub Public ReadOnly Property Nome as String Get return nome End Get End Property Public AnniServizio as Integer Get return anniDiServizio End Get End Property End Class Public Class Manager Inherits Impiegato Private nomeSegretaria as String Public Sub New(n as String, s as Double, m asString, ads as Integer) MyBase.New(n, s, m, ads) nomeSegretaria = String.empty End Sub Public Sub incrementaSalario(percentuale as Double) ' Aggiunge alla percentuale lo 0.5% per ogni anno di servizio Dim bonus as Double = 0.5 * AnniServizio MyBase.incrementaSalario(percentuale + bonus) End Sub Public Property Segretaria as String Get return nomeSegretaria End Get Set(ByValue Value as String) nomeSegretaria = Value End Set End Property End Class