Question: LAB 6 CREATING AND USING ARRAYS IN JAVA (3%) The manager wants to know how much each employee is contributing to the total sales of
LAB 6 CREATING AND USING ARRAYS IN JAVA (3%)
The manager wants to know how much each employee is contributing to the total sales of the company.
Create Lab6-Arrays project with classes SalesReport and SalesReportTest.
The program gets the following input:
o the number of sales people
o the name of each salesperson
o his/her sales for the past month
SalesReport class:
o Use an array to store the names and another array to store the sales for each person.
o Add a method to get names and sales figures for each person and then add them into respective arrays. o Add a private method to calculate and return the total sales.
o Add a private method to calculate and return the percentage of total sales contributed by a particular employee.
o Add an overrided toString() method to return a string that prints all sales people with their names, percent sales formatted to one decimal and total sales.
SalesReportTester class:
o Ask for number of sales people.
o Call required methods to take and process inputs.
o Print % sales for each sales person.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
