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

Please visual software for th following program: Please; Provide an output pleas

ID: 3763134 • Letter: P

Question

Please visual software for th following program: Please; Provide an output please and please help

A sales company wants to have a program to keep track of their employees' pays per each quarter. There are two types of employees: Managers and SalesReps. Note that a manager has a fixed monthly income of $3,500 but a sales representative has a base salary of $2,000 plus a 5% commission rate of the sales amount. Come up with class declarations in which one class is an abstract class, and other classes are derived from the abstract class. The classes will be used for a polymorphic application. The derived classes should have at least two public member functions. Submit the following items: -Abstract class declaration. -first derived class declaration. -second derived class declaration - main( ) that contains declarations of objects and use objects to call their member functions.

Explanation / Answer

Const PayRate As Decimal = 3500.00D

Class Employee
Overridable Function PayEmployee(
ByVal PayRate As Decimal) As Decimal

PayEmployee = PayRate
End Function
'Getter method
Get
Return PayRate
End Get
End Class

Class Manager
Inherits Employee
'constructor
Overrides Function PayEmployee(
ByVal PayRate As Decimal) As Decimal

' it overides method
PayEmployee = MyBase.PayEmployee(PayRate)
End Function
'Getter method
Get
Return PayRate
End Get
End Class

Class SalesRep
Inherits Employee
'constructor
Overrides Function PayEmployee(
ByVal PayRate As Decimal) As Decimal,
ByVal CommisionRate As Decimal

' it overides method
PayEmployee = MyBase.PayEmployee(PayRate)*CommisionRate
End Function
'Getter method
Get
Return PayRate
End Get
End Class

Sub RunPayroll()
'creating objects
Dim manager As Manager = New Manager
Dim salesreps As SalesRep = New SalesRep
Dim bonus As Decimal = 5
Dim salesPayrate As Decimal = 2000
'printing results
MsgBox("Manager pay is: " &
manager.PayEmployee(PayRate))

MsgBox("Sales Representative pay with bonus is: " &
salesreps.PayEmployee(salesPayrate, bonus))
End Sub