Develop a Java application and use a two-dimensional array that will store three property sales for

two estate agents for January, February, and March. In your solution, include the total property
sales and the 2% commission earned by each estate agent. You are also required to display the
top-selling estate agent.
Your program must:
Q.1.1 Contain a two-dimensional array to contain three property sales for January, February,
and March for two different estate agents.
ESTATE AGENTS JAN FEB MAR
Joe Bloggs R 800 000 R 1 500 000 R 2 000 000
Jane Doe R 700 000 R 1 200 000 R 1 600 000
Q.1.2 Calculate and print the total property sales for each estate agent.
Q.1.3 Calculate and print the total 2% commission earned by each estate agent.Q.1.4 Make use of a class named EstateAgent that contains methods to calculate estate agent
sales, estate agent commission, and the top-performing estate agent. The EstateAgent
class must implement an IEstateAgent interface that contains the following:
public interface IEstateAgent {
double EstateAgentSales(double[] propertySales);
double EstateAgentCommission(double propertySales);
int TopEstateAgent(double[] totalSales);
}
Q.1.5 You are required to write unit tests for the application. Create a test package within the
application you created, which will contain the necessary unit tests.
You are required to write the following unit tests:
Test Name Test Purpose
CalculateTotalSales_ReturnsTotalSales() To supply the property sales to the
estate agent sales method. The test
will determine that the correct total
sales value is returned from the estate
agent sales method.
CalculateTotalCommission_ReturnsCommission() To supply a total property sales
amount to the estate agent
commission method. The test will
determine that the correct estate
agent commission has been
calculated.
TopAgent_ReturnsTopPosition() To supply total sales for each estate
agent to the top estate agent method.
The test will determine the top selling
total property sales for the estate
agent..Include the import method

import org.junit.Assert;

import org.junit.Test;

public class EstateAgentTest {

@Test
public void calculateTotalSales_ReturnsTotalSales() {
// Arrange
double[] propertySales = {800000, 1500000, 2000000};
EstateAgent estateAgent = new EstateAgent();

// Act
double totalSales = estateAgent.EstateAgentSales(propertySales);

// Assert
Assert.assertEquals(4300000, totalSales, 0);
}

@Test
public void calculateTotalCommission_ReturnsCommission() {
// Arrange
double totalSales = 4300000;
EstateAgent estateAgent = new EstateAgent();

// Act
double commission = estateAgent.EstateAgentCommission(totalSales);

// Assert
Assert.assertEquals(86000, commission, 0);
}

@Test
public void topAgent_ReturnsTopPosition() {
// Arrange
double[] totalSales = {4300000, 3500000};
EstateAgent estateAgent = new EstateAgent();

// Act
int topAgent = estateAgent.TopEstateAgent(totalSales);

// Assert
Assert.assertEquals(0, topAgent);
}
}