Question
C# programing: 1. In this exercise you are going to modify your ClassDesignConcepts application by adding a Manager class and Sales Associate class that both
C# programing:
1. In this exercise you are going to modify your ClassDesignConcepts application by adding a
Manager class and Sales Associate class that both derive from your employee class. Before
doing this assignment you should review your ClassDesignConcepts exercise and the video
that goes along with it.
2. Create a new application called DerivedClass_YourLastNameFirstName. For example, if your
name was Bill Gates your project name would be DerivedClass_GatesBill.
3. In this project copy over your Employee class developed in the ClassDesignConcepts
exercise.
4. Create a new class called Manager that derives from your Employee class. Your Manager
class will add the following functionality:
? Has a property for stock options that gets and sets the number of stock options. Use an
appropriate default if a null constructor is used on your manager object.
? Adds a method that will calculate a bonus based upon a user inputted value.
5. Create a class named SalesAssociate that derives from your Employee class and has the
following additional functionality:
? Has a property named NumberOfSales that keeps track of the monthly sales for a Sales
Associate. You will need an appropriate default for this property if a null constructor is used
for your Sales Associate object.
? Adds a method named SalesBonus that calculates a bonus 5% if a Sales Associate makes
over 10 sales a month, 10% for over 20 sales, and 20% for over 30 sales per month.
You will need appropriate overrides to the ToString() method to print out the state information
associated with your new classes.
Program Class:
In your Main method do the following:
1. Create a manager object with your null constructor to check for a missing data situation.
2. Print out the data for this null manager object.
3. Create a sales associate object with your null constructor and then print out the state
information for this object. Print out your state information after creating your object.
4. Create a manager object that has an employee id of 102, first name of Carol, last name of
Smith, date of birth of 2/23/1993, hire date of 9/5/2011, current salary of 7580 a month, and
gets a bonus of $500 with 50 stock options. Print out your state information.
5. Create another manager object that has an employee id of 103, first name of Bill, last name of
Goode, date of birth of 1/11/2004, hire date of 3/12/2012, current salary of 5600 a month, no
bonus or stock options. Print out your state information.
6. Create a sales associate who has an employee id of 34, first name of Homer, last name of
Grant, date of birth of 5/1/1987, hire date of 2/2/2011, current salary of 4300 a month, 15 sales
this month. Print out your state information.
7. Create a sales associate who has an employee id of 211, first name of Elena, last name of
Garcia, date of birth of 4/4/1995, hire date of 3/24/2007, current salary of 3400 a month, 5
sales this month. Print out your state information.
After creating your objects and printing out the state information now use polymorphism by creating a
List of your employee objects and then print out state information with a foreach block.
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