Question: 7 . 1 0 ( Sales Commissions ) Use a one - dimensional array to solve the following problem: A company pays its salespeople on
Sales Commissions Use a onedimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeople receive $ per week plus of their gross sales for that week. For example, a salesperson who grosses $ in sales in a week receives $ plus of $ or a total of $ Write an application using an array of counters that determines how many of the salespeople earned salaries in each of the following ranges assume that each salespersons salary is truncated to an integer amount:
$
$
$
$
$
$
$
$
$ and over
Summarize the results in tabular format.
this is what i have so far.
import java.util.Scanner;
public class SalesCommission
public static void mainString args
int countersnew int;
Scanner input new ScannerSystemin;
while true
System.out.printPlease enter gross sales of the week S to stop: ;
double sales input.nextDouble;
ifsalesS
break;
double total sales ;
System.out.printlnYou will receive total this week.";
int index inttotal;
ifindex
index;
countersindex;
System.out.printlnCounters are: ;
forint i;i;i
System.out.printf$ddd
ii countersi;
System.out.println$ and over counters;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
