use c++ toWrite a class SalesPerson with data members as sales vector of size 12. Write member functions including constructor to set the sales to 0.0, inputSalesFromUser method to get the sales value as input from the user and call the setSales method from within the inputSalesFromUser to store each of the received input sales value into the vector in setSales method. setSales is a function to set one of the 12 monthly sales figure each times it is called. Add another function printAnnualSales() that prints the total annual sales by calling a private member function, that is, totalAnnualSales(). The utility function totalAnnualSales() must sum up the total sales and return the sum to the calling point that is within printAnnualSales() function. Write a main function to test your newly developed class.
use c++ toWrite a class SalesPerson with data members as sales
setSales is a function to set one of the 12 monthly sales figure each times it is called.
Add another function printAnnualSales() that prints the total annual sales by calling a private member function, that is, totalAnnualSales().
The utility function totalAnnualSales() must sum up the total sales and return the sum to the calling point that is within printAnnualSales() function.
Write a main function to test your newly developed class.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images