For this lab you are going to make an enhancement to the iLabs you have been working on this session. You will be adding two classes to your UML and developing those classes in C#. You will also add code to the Main() to demonstrate that the new classes work as expected.

The first class you’ll add is Commissioned. This represents a commissioned employee. This class is derived from Employee. There are two attributes that are both double: commissionRate and salesAmount. The class should include a default constructor and an overloaded constructor similar to what you did for Hourly and Salaried. The class should also include properties for each attribute, a ToString(), a CalculateWeeklyPay() and a CalculateNetPay(). You will need to set the Annual Salary equal to salesAmount * commissionRate. HINT: look at the properties in the Hourly class for guidance. The weekly pay will be AnnualSalary/52. The TAX_RATE constant will be .75 to calculate the net pay. There is no max for commissionRate or salesAmount however the min is 0.

The second class you’ll add is CommissionedPlusBase. This represents a commissioned employee who earns a base salary in addition to commission for sales. This class is derived from Commissioned. There is one attribute that is a double: baseSalary. The class should include a default constructor and an overloaded constructor similar to Commissioned. The class should also include a property for the attribute, a ToString(), a CalculateWeeklyPay() and a CalculateNetPay(). You will need to set the Annual Salary equal to baseSalary + (commissionRate*salesAmount). See HINT above. The weekly pay will be AnnualSalary/52. The TAX_RATE constant will be 75 to calculate the net pay. There is no max for baseSalary however the min is 0.

In the Main, add 2 elements to you array, one for each new class. Prompt the user for values and display the results just like the other classes.

I have uploaded my previous lab here with all the proper classes 

    • 10 years ago
    complete solution A++
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      cis247_wk7_lab_lastname.zip