Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Be able to use an abstract class Be able to override a virtual methods and implement an abstract method Be able to define abstract classes
- Be able to use an abstract class
- Be able to override a virtual methods and implement an abstract method
- Be able to define abstract classes for the purpose of inheritance
- Be able to Implement abstract methods in the child class.
- Be able to consider inheritance design guidelines when designing for inheritance
Activities:
1. Write a C# program according to the following UML class diagram:
C# C# C# C# C# C# C#
Firm Main (args : stringll) StaffMember # name: string # address: string #phone: string + creates StaffMember (eName : string, eAddress : string, e Phone : string) +ToString : string + Pay 0: double Staff staffList Staff Member + acreate Staff + Payday 0 Employee # socialSecurityNumber:string * payRate: double + screate> Employee (eName : string, eAddress : string, e Phone : string, socSecNumber : string, rate : double) + ToString 0: string + Pay O: double Volunteer create> Volunteer (eName : string, eAddress : string, e Phone : string) Pay 0: double Executive bonus double Hourly - hoursWorked: int + create Hourly (eName : string, eAddress : string, e Phone : string, socSec Number : string, rate : double) + addHours (moreHours: int) + Pay(): double ToString 0: string + create Executive (eName : string, eAddress : string, e Phone : string, socSecNumber : string, rate : double) + awardBonus (execBonus : double) + Pay O: double Assignment 3: Comprehensive Assignment. Objectives . Be able to use an abstract class Be able to override a virtual methods and implement an abstract method Be able to define abstract classes for the purpose of inheritance Be able to Implement abstract methods in the child class. Be able to consider inheritance design guidelines when designing for inheritance Activities: 1. Write a C# program according to the following UML class diagram: Firm Man cargs strings StaffMember name string address string phone: string create Staff Member Name string Address: stringe Phone: string .ToString string Pay O: double A Staff statist: StaltMember Create Staff Payday 0 Employee Social Security Number string payRate: double - creates Employee (eName string Address stringe Phone: string, socSecNumber : string rate : double) .ToString Ostring Pay double Volunteer create Volunteer (eNamestring. Address stringe Phone: stringi - Pay O: double Hourly Executive hours Worked in bonus double Create Hourly (Name:string Address stringe Phone: string, socSeNumber:string rate: double) addHours morehours: int - Pay O: double -ToString 0:string - creates Executive (eNamestring, Address string, Phone: string, socSec Number string rate: double) - awardBonus (excBonus: double) -Pay double
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started