Design a class for a sales person that has the following members variable:  EID: To holds the sales person’s employment ID  Firstname: To holds the sales person’s first name.  Lastname: To holds the sales person’s last name.  Date: To holds the sales person’s birth date  TotalAnnualSales: To holds the sales person’s total sales in a year. In addition, the class should have the following member functions.  Constructor: The constructor should accept the sales person’s data as arguments and assign these values to the object’s member variables.  Mutators: Appropriate mutator functions should be created to allow values to be set for each object’s data members.  Accessors: Appropriate accessor functions should be created to allow values to be retrieved from an object’s data members.  calculateCommission: This function should calculate and display the commission amount for a sales person based on his totalAnnualSales. See below.   TotalAnnualSales Commission percentage  Under $10,00 No commission  $10,000-$20,00 2% of TotalAnnualSales  Greater than $20,000 4% of TotalAnnualSales Demonstrate the class in a program that creates a sales person object, and then calls each of the functions in the class

In order to design a class for a sales person, we need to define the member variables and member functions that will be essential for this class. The class should have the following member variables: EID (for employment ID), Firstname (for the sales person’s first name), Lastname (for the sales person’s last name), Date (for the sales person’s birth date), and TotalAnnualSales (for the sales person’s total sales in a year).

First, we need to define the constructor function for this class. The constructor should accept the sales person’s data as arguments and assign these values to the object’s member variables. This will allow us to initialize the object with the necessary information.

Next, we need to create appropriate mutator functions for each member variable. These mutators will allow us to set values for each object’s data members. For example, we can create a mutator function called setEID() that sets the value of the EID member variable.

Similarly, we also need to create appropriate accessor functions that will allow us to retrieve values from an object’s data members. For example, we can create an accessor function called getFirstname() that returns the value of the Firstname member variable.

Additionally, we need to create a function called calculateCommission(). This function will calculate and display the commission amount for a sales person based on their TotalAnnualSales. The commission percentage will depend on the total annual sales as follows:
– If the TotalAnnualSales is under $10,000, there will be no commission.
– If the TotalAnnualSales is between $10,000 and $20,000, the commission will be 2% of the TotalAnnualSales.
– If the TotalAnnualSales is greater than $20,000, the commission will be 4% of the TotalAnnualSales.

To demonstrate the class in a program, we can create a sales person object and then call each of the functions in the class. This will allow us to initialize the object with the necessary data, set values for the member variables, retrieve values from the member variables using the accessor functions, and calculate and display the commission amount using the calculateCommission() function.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer