write a java code to represent a sales class asfollows:
1- The Sales class contains the names ofsellers (strings) and the sales/seller/day (matrix of integers).Assume the number of sellers is set dynamically by the constructorand that the sellers work 6 days/week.
Example:
names/days | 0 | 1 | 2 | 3 | 4 | 5 |
Ali | 30 | 5 | 89 | 71 | 90 | 9 |
Ahmad | 15 | 81 | 51 | 69 | 78 | 25 |
Omar | 85 | 96 | 7 | 87 | 41 | 54 |
The class should contain the following methods:
- setSaleDetails, this method takes two arguments: the array ofsellers' names and their detailed sales as a matrix ofintegers.
- printSalesDetails. This method prints the sellers' names andtheir sales (as in the example)
- printTotalSalesPerSeller. This method prints the list of totalsales for each seller during the week
- getBestSeller . This method prints the name of the seller whoachieved the highest sales during the whole week.
- getBestSellerAtDay . This method takes an integer Day as anargument (from 0 - 5). and prints the name of the seller whoachieved the highest sales at this specific day.
----- You are asked to implement a tester class calledSalesTester which has the main and do the following:
- creates an object from class Sales with a specific number ofsales (example: 3)
- generates a random set of sales for each seller. Assumesales/day is integer and between 0 and 100.
- set the names of sellers and their sales (pass it to createdobject)
- calls all the methods of the class Sales for testing.