Question: in c# please c# c# Objectives Be able to use an interface Be able to implement an abstract method Be able to consider polymorphism via

in c# please c# c# Objectives Be able to use an interfacein c# please c# c#

Objectives

  • Be able to use an interface
  • Be able to implement an abstract method
  • Be able to consider polymorphism via interface

Activities:

1. write the program to use polymorphism via interface according to the following UML class diagram to solve the payroll problem:

Staff interfaces stafPay Firm staffl ist stafPayl Main (args: stringill + create Staff + Payday 0 + Pay(): double ToString (): string StaffMember # name: string # address: string #phone: string + create Stat Member (cName : string. cAddress : string. c Phone : string) + ToString : string Volunteer 1 1 1 1 1 ! 1 Employee social Security Nurnber: String * payRate: double + creales Employee (eName : string, eAddress : String, e Phone : string, socSecNumber : string, rate : double) - ToString 0:string - Pay 0: double + creales Volunteer (eName : String, eAduress: string, e Phone: string) + Pay 0: double Executive bonus: double Hourly - hoursWorked: int + screate Hourly (eName : string, eAddress : string, e Phone : string, socSecNumber:string, rate : double) + addHours (moreHours: inu) + Pay O: double + ToString O: string + acreate Executive (eName : string, eAddress : string, e Phone: string, sodSec Number : string, rate : double) + awardBonus (execBonus : double) + Pay O: double

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!