Question
In java language, Process sales information for each of the salesperson in a firm.Ask the user to enter the number of salespeople.Store the name of
In java language,
Process sales information for each of the salesperson in a firm.Ask the user to enter the number of salespeople.Store the name of each salesperson and the amount of sales in two parallel arrays. Allow to continue only if the user inputs positive number for sales. Use continuous loop. Calculate commission for each salesperson in dollars and store it in another array based on the following.
-Less than $2000, 5% commission
-more than $2000 and less than $5000, 10% commission
-more than $5000, 20% commission
Write a method for each of the following:
-to input and return the number of salesperson
-to gather the required input data.
-to calculate the commission array. -to calculate and return total sales for the firm. Totals sales does not include the commission. -to calculate and return average sales for the firm. The average sales value does not include the commission.
-to calculate and return the total commission for the firm.
-Write a method to display the salesperson's name and amount of sales and the amount of commission for all salesperson in a tabular format. -Write a method that accepts the name of a salesperson as its parameter and returns the amount of commission for the given salesperson. If the given name does not exist, issue an error message.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started