C# OOP abstract and interface class

Nov 30 2018 7:53 PM
hi, i am new in oop using C# language, can anyone help me try to solve this problem. 

Create an interface called Payable. This is the interface that will be used by the accounting department's software (which you are not responsible for authoring) for all things that they need to write checks for. The Payable interface should contain three functions:

  • Retrieve amount due
  • Add to amount due
  • Payment address

Derive an Employee class from the Person class. The Employee class should add the following properties:

  • Salary
  • Mailing address

In addition, the Employee class should implement the Payable interface. The implementation of the functions specified in the Payable interface should make sense. In other words, the payment address should be the mailing address of the employee. In order to make this work right, you will need to allocate an internally protected state variable that keeps track of the amount of money due. This state variable will obviously be modified by the functions defined in the interface. You can of course, try to do this with a property and add this property to the Payable interface.


Answers (1)