- Feb 9, 2005
- 25
- 0
- 0
Basically i need to creat a SalesPerson array the size of 20. It will read data from a txt file which follows this format (Name followed by sales on the next line). Once the program reads the line, it will see if it has any information for that salesperson in the record array and if not, it will create a new entry for that salesperson. And im going to have commission calculated like this:
0% commission on sales <= $1000.00
5% commission on sales > $1000.00 and <= $2500.00
10% commission on sales > $2500.00
And it will add this new commission to this salespersons sales and commissions.
Ex: On sales of $5000.00 the commission would be
(0% of first $1000) + (5% of $1500) + (10% of (sales -2500))
----------
This is Basically what I have so far and I dont know if its right
----------
class SalesMan
{
String name;
int total Sales;
int totalCommission;
int NumOfSales;
SalesMan[] records = new SalesMan[20];
int NumOfSalesMan = 0;
----
I wanna say that I repeat that last thing for total sales and totalcommission as well??? I'm not sure, I'm having a major brain fart right now as i have gone 18 hrs on 2 hrs of sleep now and i can barely hold my eyes open let alone think. Any help would be great. Hopefully it will hit me when i get a good nights sleep. Thanks in advacne.....
0% commission on sales <= $1000.00
5% commission on sales > $1000.00 and <= $2500.00
10% commission on sales > $2500.00
And it will add this new commission to this salespersons sales and commissions.
Ex: On sales of $5000.00 the commission would be
(0% of first $1000) + (5% of $1500) + (10% of (sales -2500))
----------
This is Basically what I have so far and I dont know if its right
----------
class SalesMan
{
String name;
int total Sales;
int totalCommission;
int NumOfSales;
SalesMan[] records = new SalesMan[20];
int NumOfSalesMan = 0;
----
I wanna say that I repeat that last thing for total sales and totalcommission as well??? I'm not sure, I'm having a major brain fart right now as i have gone 18 hrs on 2 hrs of sleep now and i can barely hold my eyes open let alone think. Any help would be great. Hopefully it will hit me when i get a good nights sleep. Thanks in advacne.....
